#pragma once

#include once "_mingw_unicode.bi"
#include once "commctrl.bi"
#include once "devpropdef.bi"

#if defined(__FB_WIN32__) and defined(__FB_64BIT__)
	#include once "pshpack8.bi"
#else
	#include once "pshpack1.bi"
#endif

#include once "poppack.bi"

#define _INC_SETUPAPI
#define WINSETUPAPI DECLSPEC_IMPORT
const _SETUPAPI_VER = &h0502
#define __LPGUID_DEFINED__
type LPGUID as GUID ptr
const LINE_LEN = 256
const MAX_INF_STRING_LENGTH = 4096
const MAX_INF_SECTION_NAME_LENGTH = 255
const MAX_TITLE_LEN = 60
const MAX_INSTRUCTION_LEN = 256
const MAX_LABEL_LEN = 30
const MAX_SERVICE_NAME_LEN = 256
const MAX_SUBTITLE_LEN = 256
#define SP_MAX_MACHINENAME_LENGTH (MAX_PATH + 3)
type HINF as PVOID

type _INFCONTEXT
	Inf as PVOID
	CurrentInf as PVOID
	Section as UINT
	Line as UINT
end type

type INFCONTEXT as _INFCONTEXT
type PINFCONTEXT as _INFCONTEXT ptr

type _SP_INF_INFORMATION
	InfStyle as DWORD
	InfCount as DWORD
	VersionData(0 to ANYSIZE_ARRAY - 1) as BYTE
end type

type SP_INF_INFORMATION as _SP_INF_INFORMATION
type PSP_INF_INFORMATION as _SP_INF_INFORMATION ptr

type _SP_ALTPLATFORM_INFO_V2
	cbSize as DWORD
	Platform as DWORD
	MajorVersion as DWORD
	MinorVersion as DWORD
	ProcessorArchitecture as WORD
	'' TODO: __C89_NAMELESS union { WORD Reserved; WORD Flags; };
	FirstValidatedMajorVersion as DWORD
	FirstValidatedMinorVersion as DWORD
end type

type SP_ALTPLATFORM_INFO_V2 as _SP_ALTPLATFORM_INFO_V2
type PSP_ALTPLATFORM_INFO_V2 as _SP_ALTPLATFORM_INFO_V2 ptr

type _SP_ALTPLATFORM_INFO_V1
	cbSize as DWORD
	Platform as DWORD
	MajorVersion as DWORD
	MinorVersion as DWORD
	ProcessorArchitecture as WORD
	Reserved as WORD
end type

type SP_ALTPLATFORM_INFO_V1 as _SP_ALTPLATFORM_INFO_V1
type PSP_ALTPLATFORM_INFO_V1 as _SP_ALTPLATFORM_INFO_V1 ptr
type SP_ALTPLATFORM_INFO as SP_ALTPLATFORM_INFO_V2
type PSP_ALTPLATFORM_INFO as PSP_ALTPLATFORM_INFO_V2
const SP_ALTPLATFORM_FLAGS_VERSION_RANGE = &h0001

type _SP_ORIGINAL_FILE_INFO_A
	cbSize as DWORD
	OriginalInfName(0 to MAX_PATH - 1) as CHAR
	OriginalCatalogName(0 to MAX_PATH - 1) as CHAR
end type

type SP_ORIGINAL_FILE_INFO_A as _SP_ORIGINAL_FILE_INFO_A
type PSP_ORIGINAL_FILE_INFO_A as _SP_ORIGINAL_FILE_INFO_A ptr

type _SP_ORIGINAL_FILE_INFO_W
	cbSize as DWORD
	OriginalInfName(0 to MAX_PATH - 1) as WCHAR
	OriginalCatalogName(0 to MAX_PATH - 1) as WCHAR
end type

type SP_ORIGINAL_FILE_INFO_W as _SP_ORIGINAL_FILE_INFO_W
type PSP_ORIGINAL_FILE_INFO_W as _SP_ORIGINAL_FILE_INFO_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(SP_ORIGINAL_FILE_INFO) __MINGW_TYPEDEF_UAW(PSP_ORIGINAL_FILE_INFO) typedef UINT (CALLBACK *PSP_FILE_CALLBACK_A)(PVOID Context,UINT Notification,UINT_PTR Param1,UINT_PTR Param2);
const INF_STYLE_NONE = &h00000000
const INF_STYLE_OLDNT = &h00000001
const INF_STYLE_WIN4 = &h00000002
const INF_STYLE_CACHE_ENABLE = &h00000010
const INF_STYLE_CACHE_DISABLE = &h00000020
const INF_STYLE_CACHE_IGNORE = &h00000040
const DIRID_ABSOLUTE = -1
const DIRID_ABSOLUTE_16BIT = &hffff
const DIRID_NULL = 0
const DIRID_SRCPATH = 1
const DIRID_WINDOWS = 10
const DIRID_SYSTEM = 11
const DIRID_DRIVERS = 12
const DIRID_IOSUBSYS = DIRID_DRIVERS
const DIRID_INF = 17
const DIRID_HELP = 18
const DIRID_FONTS = 20
const DIRID_VIEWERS = 21
const DIRID_COLOR = 23
const DIRID_APPS = 24
const DIRID_SHARED = 25
const DIRID_BOOT = 30
const DIRID_SYSTEM16 = 50
const DIRID_SPOOL = 51
const DIRID_SPOOLDRIVERS = 52
const DIRID_USERPROFILE = 53
const DIRID_LOADER = 54
const DIRID_PRINTPROCESSOR = 55
const DIRID_DEFAULT = DIRID_SYSTEM
const DIRID_COMMON_STARTMENU = 16406
const DIRID_COMMON_PROGRAMS = 16407
const DIRID_COMMON_STARTUP = 16408
const DIRID_COMMON_DESKTOPDIRECTORY = 16409
const DIRID_COMMON_FAVORITES = 16415
const DIRID_COMMON_APPDATA = 16419
const DIRID_PROGRAM_FILES = 16422
const DIRID_SYSTEM_X86 = 16425
const DIRID_PROGRAM_FILES_X86 = 16426
const DIRID_PROGRAM_FILES_COMMON = 16427
const DIRID_PROGRAM_FILES_COMMONX86 = 16428
const DIRID_COMMON_TEMPLATES = 16429
const DIRID_COMMON_DOCUMENTS = 16430
const DIRID_USER = &h8000
'' TODO: typedef UINT (CALLBACK *PSP_FILE_CALLBACK_W)(PVOID Context,UINT Notification,UINT_PTR Param1,UINT_PTR Param2);
#define PSP_FILE_CALLBACK __MINGW_NAME_UAW(PSP_FILE_CALLBACK)
const SPFILENOTIFY_STARTQUEUE = &h00000001
const SPFILENOTIFY_ENDQUEUE = &h00000002
const SPFILENOTIFY_STARTSUBQUEUE = &h00000003
const SPFILENOTIFY_ENDSUBQUEUE = &h00000004
const SPFILENOTIFY_STARTDELETE = &h00000005
const SPFILENOTIFY_ENDDELETE = &h00000006
const SPFILENOTIFY_DELETEERROR = &h00000007
const SPFILENOTIFY_STARTRENAME = &h00000008
const SPFILENOTIFY_ENDRENAME = &h00000009
const SPFILENOTIFY_RENAMEERROR = &h0000000a
const SPFILENOTIFY_STARTCOPY = &h0000000b
const SPFILENOTIFY_ENDCOPY = &h0000000c
const SPFILENOTIFY_COPYERROR = &h0000000d
const SPFILENOTIFY_NEEDMEDIA = &h0000000e
const SPFILENOTIFY_QUEUESCAN = &h0000000f
const SPFILENOTIFY_CABINETINFO = &h00000010
const SPFILENOTIFY_FILEINCABINET = &h00000011
const SPFILENOTIFY_NEEDNEWCABINET = &h00000012
const SPFILENOTIFY_FILEEXTRACTED = &h00000013
const SPFILENOTIFY_FILEOPDELAYED = &h00000014
const SPFILENOTIFY_STARTBACKUP = &h00000015
const SPFILENOTIFY_BACKUPERROR = &h00000016
const SPFILENOTIFY_ENDBACKUP = &h00000017
const SPFILENOTIFY_QUEUESCAN_EX = &h00000018
const SPFILENOTIFY_STARTREGISTRATION = &h00000019
const SPFILENOTIFY_ENDREGISTRATION = &h00000020
const SPFILENOTIFY_QUEUESCAN_SIGNERINFO = &h00000040
const SPFILENOTIFY_LANGMISMATCH = &h00010000
const SPFILENOTIFY_TARGETEXISTS = &h00020000
const SPFILENOTIFY_TARGETNEWER = &h00040000
const FILEOP_COPY = 0
const FILEOP_RENAME = 1
const FILEOP_DELETE = 2
const FILEOP_BACKUP = 3
const FILEOP_ABORT = 0
const FILEOP_DOIT = 1
const FILEOP_SKIP = 2
const FILEOP_RETRY = FILEOP_DOIT
const FILEOP_NEWPATH = 4
const COPYFLG_WARN_IF_SKIP = &h00000001
const COPYFLG_NOSKIP = &h00000002
const COPYFLG_NOVERSIONCHECK = &h00000004
const COPYFLG_FORCE_FILE_IN_USE = &h00000008
const COPYFLG_NO_OVERWRITE = &h00000010
const COPYFLG_NO_VERSION_DIALOG = &h00000020
const COPYFLG_OVERWRITE_OLDER_ONLY = &h00000040
const COPYFLG_REPLACEONLY = &h00000400
const COPYFLG_NODECOMP = &h00000800
const COPYFLG_REPLACE_BOOT_FILE = &h00001000
const COPYFLG_NOPRUNE = &h00002000
const DELFLG_IN_USE = &h00000001
const DELFLG_IN_USE1 = &h00010000

type _FILEPATHS_A
	Target as PCSTR
	Source as PCSTR
	Win32Error as UINT
	Flags as DWORD
end type

type FILEPATHS_A as _FILEPATHS_A
type PFILEPATHS_A as _FILEPATHS_A ptr

type _FILEPATHS_W
	Target as PCWSTR
	Source as PCWSTR
	Win32Error as UINT
	Flags as DWORD
end type

type FILEPATHS_W as _FILEPATHS_W
type PFILEPATHS_W as _FILEPATHS_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(FILEPATHS) __MINGW_TYPEDEF_UAW(PFILEPATHS) typedef struct _FILEPATHS_SIGNERINFO_A { PCSTR Target; PCSTR Source; UINT Win32Error; DWORD Flags; PCSTR DigitalSigner; PCSTR Version; PCSTR CatalogFile; } FILEPATHS_SIGNERINFO_A,*PFILEPATHS_SIGNERINFO_A;

type _FILEPATHS_SIGNERINFO_W
	Target as PCWSTR
	Source as PCWSTR
	Win32Error as UINT
	Flags as DWORD
	DigitalSigner as PCWSTR
	Version as PCWSTR
	CatalogFile as PCWSTR
end type

type FILEPATHS_SIGNERINFO_W as _FILEPATHS_SIGNERINFO_W
type PFILEPATHS_SIGNERINFO_W as _FILEPATHS_SIGNERINFO_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(FILEPATHS_SIGNERINFO) __MINGW_TYPEDEF_UAW(PFILEPATHS_SIGNERINFO) typedef struct _SOURCE_MEDIA_A { PCSTR Reserved; PCSTR Tagfile; PCSTR Description; PCSTR SourcePath; PCSTR SourceFile; DWORD Flags; } SOURCE_MEDIA_A,*PSOURCE_MEDIA_A;

type _SOURCE_MEDIA_W
	Reserved as PCWSTR
	Tagfile as PCWSTR
	Description as PCWSTR
	SourcePath as PCWSTR
	SourceFile as PCWSTR
	Flags as DWORD
end type

type SOURCE_MEDIA_W as _SOURCE_MEDIA_W
type PSOURCE_MEDIA_W as _SOURCE_MEDIA_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(SOURCE_MEDIA) __MINGW_TYPEDEF_UAW(PSOURCE_MEDIA) typedef struct _CABINET_INFO_A { PCSTR CabinetPath; PCSTR CabinetFile; PCSTR DiskName; USHORT SetId; USHORT CabinetNumber; } CABINET_INFO_A,*PCABINET_INFO_A;

type _CABINET_INFO_W
	CabinetPath as PCWSTR
	CabinetFile as PCWSTR
	DiskName as PCWSTR
	SetId as USHORT
	CabinetNumber as USHORT
end type

type CABINET_INFO_W as _CABINET_INFO_W
type PCABINET_INFO_W as _CABINET_INFO_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(CABINET_INFO) __MINGW_TYPEDEF_UAW(PCABINET_INFO) typedef struct _FILE_IN_CABINET_INFO_A { PCSTR NameInCabinet; DWORD FileSize; DWORD Win32Error; WORD DosDate; WORD DosTime; WORD DosAttribs; CHAR FullTargetName[MAX_PATH]; } FILE_IN_CABINET_INFO_A,*PFILE_IN_CABINET_INFO_A;

type _FILE_IN_CABINET_INFO_W
	NameInCabinet as PCWSTR
	FileSize as DWORD
	Win32Error as DWORD
	DosDate as WORD
	DosTime as WORD
	DosAttribs as WORD
	FullTargetName(0 to MAX_PATH - 1) as WCHAR
end type

type FILE_IN_CABINET_INFO_W as _FILE_IN_CABINET_INFO_W
type PFILE_IN_CABINET_INFO_W as _FILE_IN_CABINET_INFO_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(FILE_IN_CABINET_INFO) __MINGW_TYPEDEF_UAW(PFILE_IN_CABINET_INFO) typedef struct _SP_REGISTER_CONTROL_STATUSA { DWORD cbSize; PCSTR FileName; DWORD Win32Error; DWORD FailureCode; } SP_REGISTER_CONTROL_STATUSA,*PSP_REGISTER_CONTROL_STATUSA;

type _SP_REGISTER_CONTROL_STATUSW
	cbSize as DWORD
	FileName as PCWSTR
	Win32Error as DWORD
	FailureCode as DWORD
end type

type SP_REGISTER_CONTROL_STATUSW as _SP_REGISTER_CONTROL_STATUSW
type PSP_REGISTER_CONTROL_STATUSW as _SP_REGISTER_CONTROL_STATUSW ptr
'' TODO: __MINGW_TYPEDEF_AW(SP_REGISTER_CONTROL_STATUS) __MINGW_TYPEDEF_AW(PSP_REGISTER_CONTROL_STATUS) typedef PVOID HSPFILEQ;
const SPREG_SUCCESS = &h00000000
const SPREG_LOADLIBRARY = &h00000001
const SPREG_GETPROCADDR = &h00000002
const SPREG_REGSVR = &h00000003
const SPREG_DLLINSTALL = &h00000004
const SPREG_TIMEOUT = &h00000005
const SPREG_UNKNOWN = &hFFFFFFFF

type _SP_FILE_COPY_PARAMS_A
	cbSize as DWORD
	QueueHandle as HSPFILEQ
	SourceRootPath as PCSTR
	SourcePath as PCSTR
	SourceFilename as PCSTR
	SourceDescription as PCSTR
	SourceTagfile as PCSTR
	TargetDirectory as PCSTR
	TargetFilename as PCSTR
	CopyStyle as DWORD
	LayoutInf as HINF
	SecurityDescriptor as PCSTR
end type

type SP_FILE_COPY_PARAMS_A as _SP_FILE_COPY_PARAMS_A
type PSP_FILE_COPY_PARAMS_A as _SP_FILE_COPY_PARAMS_A ptr

type _SP_FILE_COPY_PARAMS_W
	cbSize as DWORD
	QueueHandle as HSPFILEQ
	SourceRootPath as PCWSTR
	SourcePath as PCWSTR
	SourceFilename as PCWSTR
	SourceDescription as PCWSTR
	SourceTagfile as PCWSTR
	TargetDirectory as PCWSTR
	TargetFilename as PCWSTR
	CopyStyle as DWORD
	LayoutInf as HINF
	SecurityDescriptor as PCWSTR
end type

type SP_FILE_COPY_PARAMS_W as _SP_FILE_COPY_PARAMS_W
type PSP_FILE_COPY_PARAMS_W as _SP_FILE_COPY_PARAMS_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(SP_FILE_COPY_PARAMS) __MINGW_TYPEDEF_UAW(PSP_FILE_COPY_PARAMS) typedef PVOID HDSKSPC;
type HDEVINFO as PVOID

type _SP_DEVINFO_DATA
	cbSize as DWORD
	ClassGuid as GUID
	DevInst as DWORD
	Reserved as ULONG_PTR
end type

type SP_DEVINFO_DATA as _SP_DEVINFO_DATA
type PSP_DEVINFO_DATA as _SP_DEVINFO_DATA ptr

type _SP_DEVICE_INTERFACE_DATA
	cbSize as DWORD
	InterfaceClassGuid as GUID
	Flags as DWORD
	Reserved as ULONG_PTR
end type

type SP_DEVICE_INTERFACE_DATA as _SP_DEVICE_INTERFACE_DATA
type PSP_DEVICE_INTERFACE_DATA as _SP_DEVICE_INTERFACE_DATA ptr
const SPINT_ACTIVE = &h00000001
const SPINT_DEFAULT = &h00000002
const SPINT_REMOVED = &h00000004
type SP_INTERFACE_DEVICE_DATA as SP_DEVICE_INTERFACE_DATA
type PSP_INTERFACE_DEVICE_DATA as PSP_DEVICE_INTERFACE_DATA
const SPID_ACTIVE = SPINT_ACTIVE
const SPID_DEFAULT = SPINT_DEFAULT
const SPID_REMOVED = SPINT_REMOVED

type _SP_DEVICE_INTERFACE_DETAIL_DATA_A
	cbSize as DWORD
	DevicePath(0 to ANYSIZE_ARRAY - 1) as CHAR
end type

type SP_DEVICE_INTERFACE_DETAIL_DATA_A as _SP_DEVICE_INTERFACE_DETAIL_DATA_A
type PSP_DEVICE_INTERFACE_DETAIL_DATA_A as _SP_DEVICE_INTERFACE_DETAIL_DATA_A ptr

type _SP_DEVICE_INTERFACE_DETAIL_DATA_W
	cbSize as DWORD
	DevicePath(0 to ANYSIZE_ARRAY - 1) as WCHAR
end type

type SP_DEVICE_INTERFACE_DETAIL_DATA_W as _SP_DEVICE_INTERFACE_DETAIL_DATA_W
type PSP_DEVICE_INTERFACE_DETAIL_DATA_W as _SP_DEVICE_INTERFACE_DETAIL_DATA_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(SP_DEVICE_INTERFACE_DETAIL_DATA) __MINGW_TYPEDEF_UAW(PSP_DEVICE_INTERFACE_DETAIL_DATA) typedef SP_DEVICE_INTERFACE_DETAIL_DATA_W SP_INTERFACE_DEVICE_DETAIL_DATA_W;
type PSP_INTERFACE_DEVICE_DETAIL_DATA_W as PSP_DEVICE_INTERFACE_DETAIL_DATA_W
type SP_INTERFACE_DEVICE_DETAIL_DATA_A as SP_DEVICE_INTERFACE_DETAIL_DATA_A
type PSP_INTERFACE_DEVICE_DETAIL_DATA_A as PSP_DEVICE_INTERFACE_DETAIL_DATA_A
'' TODO: __MINGW_TYPEDEF_UAW(SP_INTERFACE_DEVICE_DETAIL_DATA) __MINGW_TYPEDEF_UAW(PSP_INTERFACE_DEVICE_DETAIL_DATA) typedef struct _SP_DEVINFO_LIST_DETAIL_DATA_A { DWORD cbSize; GUID ClassGuid; HANDLE RemoteMachineHandle; CHAR RemoteMachineName[(MAX_PATH + 3)]; } SP_DEVINFO_LIST_DETAIL_DATA_A,*PSP_DEVINFO_LIST_DETAIL_DATA_A;

type _SP_DEVINFO_LIST_DETAIL_DATA_W
	cbSize as DWORD
	ClassGuid as GUID
	RemoteMachineHandle as HANDLE
	RemoteMachineName(0 to (MAX_PATH + 3) - 1) as WCHAR
end type

type SP_DEVINFO_LIST_DETAIL_DATA_W as _SP_DEVINFO_LIST_DETAIL_DATA_W
type PSP_DEVINFO_LIST_DETAIL_DATA_W as _SP_DEVINFO_LIST_DETAIL_DATA_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(SP_DEVINFO_LIST_DETAIL_DATA) __MINGW_TYPEDEF_UAW(PSP_DEVINFO_LIST_DETAIL_DATA) typedef UINT DI_FUNCTION;
const DIF_SELECTDEVICE = &h00000001
const DIF_INSTALLDEVICE = &h00000002
const DIF_ASSIGNRESOURCES = &h00000003
const DIF_PROPERTIES = &h00000004
const DIF_REMOVE = &h00000005
const DIF_FIRSTTIMESETUP = &h00000006
const DIF_FOUNDDEVICE = &h00000007
const DIF_SELECTCLASSDRIVERS = &h00000008
const DIF_VALIDATECLASSDRIVERS = &h00000009
const DIF_INSTALLCLASSDRIVERS = &h0000000A
const DIF_CALCDISKSPACE = &h0000000B
const DIF_DESTROYPRIVATEDATA = &h0000000C
const DIF_VALIDATEDRIVER = &h0000000D
const DIF_DETECT = &h0000000F
const DIF_INSTALLWIZARD = &h00000010
const DIF_DESTROYWIZARDDATA = &h00000011
const DIF_PROPERTYCHANGE = &h00000012
const DIF_ENABLECLASS = &h00000013
const DIF_DETECTVERIFY = &h00000014
const DIF_INSTALLDEVICEFILES = &h00000015
const DIF_UNREMOVE = &h00000016
const DIF_SELECTBESTCOMPATDRV = &h00000017
const DIF_ALLOW_INSTALL = &h00000018
const DIF_REGISTERDEVICE = &h00000019
const DIF_NEWDEVICEWIZARD_PRESELECT = &h0000001A
const DIF_NEWDEVICEWIZARD_SELECT = &h0000001B
const DIF_NEWDEVICEWIZARD_PREANALYZE = &h0000001C
const DIF_NEWDEVICEWIZARD_POSTANALYZE = &h0000001D
const DIF_NEWDEVICEWIZARD_FINISHINSTALL = &h0000001E
const DIF_UNUSED1 = &h0000001F
const DIF_INSTALLINTERFACES = &h00000020
const DIF_DETECTCANCEL = &h00000021
const DIF_REGISTER_COINSTALLERS = &h00000022
const DIF_ADDPROPERTYPAGE_ADVANCED = &h00000023
const DIF_ADDPROPERTYPAGE_BASIC = &h00000024
const DIF_RESERVED1 = &h00000025
const DIF_TROUBLESHOOTER = &h00000026
const DIF_POWERMESSAGEWAKE = &h00000027
const DIF_ADDREMOTEPROPERTYPAGE_ADVANCED = &h00000028
const DIF_UPDATEDRIVER_UI = &h00000029
const DIF_RESERVED2 = &h00000030
const DIF_MOVEDEVICE = &h0000000E

type _SP_DEVINSTALL_PARAMS_A
	cbSize as DWORD
	Flags as DWORD
	FlagsEx as DWORD
	hwndParent as HWND
	'' TODO: __MINGW_NAME_UAW(PSP_FILE_CALLBACK) InstallMsgHandler;
	InstallMsgHandlerContext as PVOID
	FileQueue as HSPFILEQ
	ClassInstallReserved as ULONG_PTR
	Reserved as DWORD
	DriverPath(0 to MAX_PATH - 1) as CHAR
end type

type SP_DEVINSTALL_PARAMS_A as _SP_DEVINSTALL_PARAMS_A
type PSP_DEVINSTALL_PARAMS_A as _SP_DEVINSTALL_PARAMS_A ptr

type _SP_DEVINSTALL_PARAMS_W
	cbSize as DWORD
	Flags as DWORD
	FlagsEx as DWORD
	hwndParent as HWND
	'' TODO: __MINGW_NAME_UAW(PSP_FILE_CALLBACK) InstallMsgHandler;
	InstallMsgHandlerContext as PVOID
	FileQueue as HSPFILEQ
	ClassInstallReserved as ULONG_PTR
	Reserved as DWORD
	DriverPath(0 to MAX_PATH - 1) as WCHAR
end type

type SP_DEVINSTALL_PARAMS_W as _SP_DEVINSTALL_PARAMS_W
type PSP_DEVINSTALL_PARAMS_W as _SP_DEVINSTALL_PARAMS_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(SP_DEVINSTALL_PARAMS) __MINGW_TYPEDEF_UAW(PSP_DEVINSTALL_PARAMS) typedef struct _SP_CLASSINSTALL_HEADER { DWORD cbSize; DI_FUNCTION InstallFunction; } SP_CLASSINSTALL_HEADER,*PSP_CLASSINSTALL_HEADER;
#define DI_SHOWOEM __MSABI_LONG(&h00000001)
#define DI_SHOWCOMPAT __MSABI_LONG(&h00000002)
#define DI_SHOWCLASS __MSABI_LONG(&h00000004)
#define DI_SHOWALL __MSABI_LONG(&h00000007)
#define DI_NOVCP __MSABI_LONG(&h00000008)
#define DI_DIDCOMPAT __MSABI_LONG(&h00000010)
#define DI_DIDCLASS __MSABI_LONG(&h00000020)
#define DI_AUTOASSIGNRES __MSABI_LONG(&h00000040)
#define DI_NEEDRESTART __MSABI_LONG(&h00000080)
#define DI_NEEDREBOOT __MSABI_LONG(&h00000100)
#define DI_NOBROWSE __MSABI_LONG(&h00000200)
#define DI_MULTMFGS __MSABI_LONG(&h00000400)
#define DI_DISABLED __MSABI_LONG(&h00000800)
#define DI_GENERALPAGE_ADDED __MSABI_LONG(&h00001000)
#define DI_RESOURCEPAGE_ADDED __MSABI_LONG(&h00002000)
#define DI_PROPERTIES_CHANGE __MSABI_LONG(&h00004000)
#define DI_INF_IS_SORTED __MSABI_LONG(&h00008000)
#define DI_ENUMSINGLEINF __MSABI_LONG(&h00010000)
#define DI_DONOTCALLCONFIGMG __MSABI_LONG(&h00020000)
#define DI_INSTALLDISABLED __MSABI_LONG(&h00040000)
#define DI_COMPAT_FROM_CLASS __MSABI_LONG(&h00080000)
#define DI_CLASSINSTALLPARAMS __MSABI_LONG(&h00100000)
#define DI_NODI_DEFAULTACTION __MSABI_LONG(&h00200000)
#define DI_QUIETINSTALL __MSABI_LONG(&h00800000)
#define DI_NOFILECOPY __MSABI_LONG(&h01000000)
#define DI_FORCECOPY __MSABI_LONG(&h02000000)
#define DI_DRIVERPAGE_ADDED __MSABI_LONG(&h04000000)
#define DI_USECI_SELECTSTRINGS __MSABI_LONG(&h08000000)
#define DI_OVERRIDE_INFFLAGS __MSABI_LONG(&h10000000)
#define DI_PROPS_NOCHANGEUSAGE __MSABI_LONG(&h20000000)
#define DI_NOSELECTICONS __MSABI_LONG(&h40000000)
#define DI_NOWRITE_IDS __MSABI_LONG(&h80000000)
#define DI_FLAGSEX_USEOLDINFSEARCH __MSABI_LONG(&h00000001)
#define DI_FLAGSEX_RESERVED2 __MSABI_LONG(&h00000002)
#define DI_FLAGSEX_CI_FAILED __MSABI_LONG(&h00000004)
#define DI_FLAGSEX_DIDINFOLIST __MSABI_LONG(&h00000010)
#define DI_FLAGSEX_DIDCOMPATINFO __MSABI_LONG(&h00000020)
#define DI_FLAGSEX_FILTERCLASSES __MSABI_LONG(&h00000040)
#define DI_FLAGSEX_SETFAILEDINSTALL __MSABI_LONG(&h00000080)
#define DI_FLAGSEX_DEVICECHANGE __MSABI_LONG(&h00000100)
#define DI_FLAGSEX_ALWAYSWRITEIDS __MSABI_LONG(&h00000200)
#define DI_FLAGSEX_PROPCHANGE_PENDING __MSABI_LONG(&h00000400)
#define DI_FLAGSEX_ALLOWEXCLUDEDDRVS __MSABI_LONG(&h00000800)
#define DI_FLAGSEX_NOUIONQUERYREMOVE __MSABI_LONG(&h00001000)
#define DI_FLAGSEX_USECLASSFORCOMPAT __MSABI_LONG(&h00002000)
#define DI_FLAGSEX_RESERVED3 __MSABI_LONG(&h00004000)
#define DI_FLAGSEX_NO_DRVREG_MODIFY __MSABI_LONG(&h00008000)
#define DI_FLAGSEX_IN_SYSTEM_SETUP __MSABI_LONG(&h00010000)
#define DI_FLAGSEX_INET_DRIVER __MSABI_LONG(&h00020000)
#define DI_FLAGSEX_APPENDDRIVERLIST __MSABI_LONG(&h00040000)
#define DI_FLAGSEX_PREINSTALLBACKUP __MSABI_LONG(&h00080000)
#define DI_FLAGSEX_BACKUPONREPLACE __MSABI_LONG(&h00100000)
#define DI_FLAGSEX_DRIVERLIST_FROM_URL __MSABI_LONG(&h00200000)
#define DI_FLAGSEX_RESERVED1 __MSABI_LONG(&h00400000)
#define DI_FLAGSEX_EXCLUDE_OLD_INET_DRIVERS __MSABI_LONG(&h00800000)
#define DI_FLAGSEX_POWERPAGE_ADDED __MSABI_LONG(&h01000000)
#define DI_FLAGSEX_FILTERSIMILARDRIVERS __MSABI_LONG(&h02000000)
#define DI_FLAGSEX_INSTALLEDDRIVER __MSABI_LONG(&h04000000)
#define DI_FLAGSEX_NO_CLASSLIST_NODE_MERGE __MSABI_LONG(&h08000000)
#define DI_FLAGSEX_ALTPLATFORM_DRVSEARCH __MSABI_LONG(&h10000000)
#define DI_FLAGSEX_RESTART_DEVICE_ONLY __MSABI_LONG(&h20000000)

type _SP_ENABLECLASS_PARAMS
	ClassInstallHeader as SP_CLASSINSTALL_HEADER
	ClassGuid as GUID
	EnableMessage as DWORD
end type

type SP_ENABLECLASS_PARAMS as _SP_ENABLECLASS_PARAMS
type PSP_ENABLECLASS_PARAMS as _SP_ENABLECLASS_PARAMS ptr
const ENABLECLASS_QUERY = 0
const ENABLECLASS_SUCCESS = 1
const ENABLECLASS_FAILURE = 2
const DICS_ENABLE = &h00000001
const DICS_DISABLE = &h00000002
const DICS_PROPCHANGE = &h00000003
const DICS_START = &h00000004
const DICS_STOP = &h00000005
const DICS_FLAG_GLOBAL = &h00000001
const DICS_FLAG_CONFIGSPECIFIC = &h00000002
const DICS_FLAG_CONFIGGENERAL = &h00000004

type _SP_PROPCHANGE_PARAMS
	ClassInstallHeader as SP_CLASSINSTALL_HEADER
	StateChange as DWORD
	Scope as DWORD
	HwProfile as DWORD
end type

type SP_PROPCHANGE_PARAMS as _SP_PROPCHANGE_PARAMS
type PSP_PROPCHANGE_PARAMS as _SP_PROPCHANGE_PARAMS ptr

type _SP_REMOVEDEVICE_PARAMS
	ClassInstallHeader as SP_CLASSINSTALL_HEADER
	Scope as DWORD
	HwProfile as DWORD
end type

type SP_REMOVEDEVICE_PARAMS as _SP_REMOVEDEVICE_PARAMS
type PSP_REMOVEDEVICE_PARAMS as _SP_REMOVEDEVICE_PARAMS ptr
const DI_REMOVEDEVICE_GLOBAL = &h00000001
const DI_REMOVEDEVICE_CONFIGSPECIFIC = &h00000002

type _SP_UNREMOVEDEVICE_PARAMS
	ClassInstallHeader as SP_CLASSINSTALL_HEADER
	Scope as DWORD
	HwProfile as DWORD
end type

type SP_UNREMOVEDEVICE_PARAMS as _SP_UNREMOVEDEVICE_PARAMS
type PSP_UNREMOVEDEVICE_PARAMS as _SP_UNREMOVEDEVICE_PARAMS ptr
const DI_UNREMOVEDEVICE_CONFIGSPECIFIC = &h00000002

type _SP_SELECTDEVICE_PARAMS_A
	ClassInstallHeader as SP_CLASSINSTALL_HEADER
	Title(0 to 59) as CHAR
	Instructions(0 to 255) as CHAR
	ListLabel(0 to 29) as CHAR
	SubTitle(0 to 255) as CHAR
	Reserved(0 to 1) as BYTE
end type

type SP_SELECTDEVICE_PARAMS_A as _SP_SELECTDEVICE_PARAMS_A
type PSP_SELECTDEVICE_PARAMS_A as _SP_SELECTDEVICE_PARAMS_A ptr

type _SP_SELECTDEVICE_PARAMS_W
	ClassInstallHeader as SP_CLASSINSTALL_HEADER
	Title(0 to 59) as WCHAR
	Instructions(0 to 255) as WCHAR
	ListLabel(0 to 29) as WCHAR
	SubTitle(0 to 255) as WCHAR
end type

type SP_SELECTDEVICE_PARAMS_W as _SP_SELECTDEVICE_PARAMS_W
type PSP_SELECTDEVICE_PARAMS_W as _SP_SELECTDEVICE_PARAMS_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(SP_SELECTDEVICE_PARAMS) __MINGW_TYPEDEF_UAW(PSP_SELECTDEVICE_PARAMS) typedef WINBOOL (CALLBACK *PDETECT_PROGRESS_NOTIFY)(PVOID ProgressNotifyParam,DWORD DetectComplete);

type _SP_DETECTDEVICE_PARAMS
	ClassInstallHeader as SP_CLASSINSTALL_HEADER
	DetectProgressNotify as PDETECT_PROGRESS_NOTIFY
	ProgressNotifyParam as PVOID
end type

type SP_DETECTDEVICE_PARAMS as _SP_DETECTDEVICE_PARAMS
type PSP_DETECTDEVICE_PARAMS as _SP_DETECTDEVICE_PARAMS ptr
const MAX_INSTALLWIZARD_DYNAPAGES = 20

type _SP_INSTALLWIZARD_DATA
	ClassInstallHeader as SP_CLASSINSTALL_HEADER
	Flags as DWORD
	DynamicPages(0 to 19) as HPROPSHEETPAGE
	NumDynamicPages as DWORD
	DynamicPageFlags as DWORD
	PrivateFlags as DWORD
	PrivateData as LPARAM
	hwndWizardDlg as HWND
end type

type SP_INSTALLWIZARD_DATA as _SP_INSTALLWIZARD_DATA
type PSP_INSTALLWIZARD_DATA as _SP_INSTALLWIZARD_DATA ptr
const NDW_INSTALLFLAG_DIDFACTDEFS = &h00000001
const NDW_INSTALLFLAG_HARDWAREALLREADYIN = &h00000002
#define NDW_INSTALLFLAG_NEEDRESTART DI_NEEDRESTART
#define NDW_INSTALLFLAG_NEEDREBOOT DI_NEEDREBOOT
const NDW_INSTALLFLAG_NEEDSHUTDOWN = &h00000200
const NDW_INSTALLFLAG_EXPRESSINTRO = &h00000400
const NDW_INSTALLFLAG_SKIPISDEVINSTALLED = &h00000800
const NDW_INSTALLFLAG_NODETECTEDDEVS = &h00001000
const NDW_INSTALLFLAG_INSTALLSPECIFIC = &h00002000
const NDW_INSTALLFLAG_SKIPCLASSLIST = &h00004000
const NDW_INSTALLFLAG_CI_PICKED_OEM = &h00008000
const NDW_INSTALLFLAG_PCMCIAMODE = &h00010000
const NDW_INSTALLFLAG_PCMCIADEVICE = &h00020000
const NDW_INSTALLFLAG_USERCANCEL = &h00040000
const NDW_INSTALLFLAG_KNOWNCLASS = &h00080000
const DYNAWIZ_FLAG_PAGESADDED = &h00000001
const DYNAWIZ_FLAG_ANALYZE_HANDLECONFLICT = &h00000008
const DYNAWIZ_FLAG_INSTALLDET_NEXT = &h00000002
const DYNAWIZ_FLAG_INSTALLDET_PREV = &h00000004
const MIN_IDD_DYNAWIZ_RESOURCE_ID = 10000
const MAX_IDD_DYNAWIZ_RESOURCE_ID = 11000
const IDD_DYNAWIZ_FIRSTPAGE = 10000
const IDD_DYNAWIZ_SELECT_PREVPAGE = 10001
const IDD_DYNAWIZ_SELECT_NEXTPAGE = 10002
const IDD_DYNAWIZ_ANALYZE_PREVPAGE = 10003
const IDD_DYNAWIZ_ANALYZE_NEXTPAGE = 10004
const IDD_DYNAWIZ_SELECTDEV_PAGE = 10009
const IDD_DYNAWIZ_ANALYZEDEV_PAGE = 10010
const IDD_DYNAWIZ_INSTALLDETECTEDDEVS_PAGE = 10011
const IDD_DYNAWIZ_SELECTCLASS_PAGE = 10012
const IDD_DYNAWIZ_INSTALLDETECTED_PREVPAGE = 10006
const IDD_DYNAWIZ_INSTALLDETECTED_NEXTPAGE = 10007
const IDD_DYNAWIZ_INSTALLDETECTED_NODEVS = 10008

type _SP_NEWDEVICEWIZARD_DATA
	ClassInstallHeader as SP_CLASSINSTALL_HEADER
	Flags as DWORD
	DynamicPages(0 to 19) as HPROPSHEETPAGE
	NumDynamicPages as DWORD
	hwndWizardDlg as HWND
end type

type SP_NEWDEVICEWIZARD_DATA as _SP_NEWDEVICEWIZARD_DATA
type PSP_NEWDEVICEWIZARD_DATA as _SP_NEWDEVICEWIZARD_DATA ptr
type SP_ADDPROPERTYPAGE_DATA as SP_NEWDEVICEWIZARD_DATA
type PSP_ADDPROPERTYPAGE_DATA as PSP_NEWDEVICEWIZARD_DATA

type _SP_TROUBLESHOOTER_PARAMS_A
	ClassInstallHeader as SP_CLASSINSTALL_HEADER
	ChmFile(0 to MAX_PATH - 1) as CHAR
	HtmlTroubleShooter(0 to MAX_PATH - 1) as CHAR
end type

type SP_TROUBLESHOOTER_PARAMS_A as _SP_TROUBLESHOOTER_PARAMS_A
type PSP_TROUBLESHOOTER_PARAMS_A as _SP_TROUBLESHOOTER_PARAMS_A ptr

type _SP_TROUBLESHOOTER_PARAMS_W
	ClassInstallHeader as SP_CLASSINSTALL_HEADER
	ChmFile(0 to MAX_PATH - 1) as WCHAR
	HtmlTroubleShooter(0 to MAX_PATH - 1) as WCHAR
end type

type SP_TROUBLESHOOTER_PARAMS_W as _SP_TROUBLESHOOTER_PARAMS_W
type PSP_TROUBLESHOOTER_PARAMS_W as _SP_TROUBLESHOOTER_PARAMS_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(SP_TROUBLESHOOTER_PARAMS) __MINGW_TYPEDEF_UAW(PSP_TROUBLESHOOTER_PARAMS) typedef struct _SP_POWERMESSAGEWAKE_PARAMS_A { SP_CLASSINSTALL_HEADER ClassInstallHeader; CHAR PowerMessageWake[256*2]; } SP_POWERMESSAGEWAKE_PARAMS_A,*PSP_POWERMESSAGEWAKE_PARAMS_A;

type _SP_POWERMESSAGEWAKE_PARAMS_W
	ClassInstallHeader as SP_CLASSINSTALL_HEADER
	PowerMessageWake(0 to (256 * 2) - 1) as WCHAR
end type

type SP_POWERMESSAGEWAKE_PARAMS_W as _SP_POWERMESSAGEWAKE_PARAMS_W
type PSP_POWERMESSAGEWAKE_PARAMS_W as _SP_POWERMESSAGEWAKE_PARAMS_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(SP_POWERMESSAGEWAKE_PARAMS) __MINGW_TYPEDEF_UAW(PSP_POWERMESSAGEWAKE_PARAMS) typedef struct _SP_DRVINFO_DATA_V2_A { DWORD cbSize; DWORD DriverType; ULONG_PTR Reserved; CHAR Description[256]; CHAR MfgName[256]; CHAR ProviderName[256]; FILETIME DriverDate; DWORDLONG DriverVersion; } SP_DRVINFO_DATA_V2_A,*PSP_DRVINFO_DATA_V2_A;

type _SP_DRVINFO_DATA_V2_W
	cbSize as DWORD
	DriverType as DWORD
	Reserved as ULONG_PTR
	Description(0 to 255) as WCHAR
	MfgName(0 to 255) as WCHAR
	ProviderName(0 to 255) as WCHAR
	DriverDate as FILETIME
	DriverVersion as DWORDLONG
end type

type SP_DRVINFO_DATA_V2_W as _SP_DRVINFO_DATA_V2_W
type PSP_DRVINFO_DATA_V2_W as _SP_DRVINFO_DATA_V2_W ptr

type _SP_DRVINFO_DATA_V1_A
	cbSize as DWORD
	DriverType as DWORD
	Reserved as ULONG_PTR
	Description(0 to 255) as CHAR
	MfgName(0 to 255) as CHAR
	ProviderName(0 to 255) as CHAR
end type

type SP_DRVINFO_DATA_V1_A as _SP_DRVINFO_DATA_V1_A
type PSP_DRVINFO_DATA_V1_A as _SP_DRVINFO_DATA_V1_A ptr

type _SP_DRVINFO_DATA_V1_W
	cbSize as DWORD
	DriverType as DWORD
	Reserved as ULONG_PTR
	Description(0 to 255) as WCHAR
	MfgName(0 to 255) as WCHAR
	ProviderName(0 to 255) as WCHAR
end type

type SP_DRVINFO_DATA_V1_W as _SP_DRVINFO_DATA_V1_W
type PSP_DRVINFO_DATA_V1_W as _SP_DRVINFO_DATA_V1_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(SP_DRVINFO_DATA_V1) __MINGW_TYPEDEF_UAW(PSP_DRVINFO_DATA_V1) __MINGW_TYPEDEF_UAW(SP_DRVINFO_DATA_V2) __MINGW_TYPEDEF_UAW(PSP_DRVINFO_DATA_V2) typedef SP_DRVINFO_DATA_V2_A SP_DRVINFO_DATA_A;
type PSP_DRVINFO_DATA_A as PSP_DRVINFO_DATA_V2_A
type SP_DRVINFO_DATA_W as SP_DRVINFO_DATA_V2_W
type PSP_DRVINFO_DATA_W as PSP_DRVINFO_DATA_V2_W
type SP_DRVINFO_DATA as SP_DRVINFO_DATA_V2
type PSP_DRVINFO_DATA as PSP_DRVINFO_DATA_V2

type _SP_DRVINFO_DETAIL_DATA_A
	cbSize as DWORD
	InfDate as FILETIME
	CompatIDsOffset as DWORD
	CompatIDsLength as DWORD
	Reserved as ULONG_PTR
	SectionName(0 to 255) as CHAR
	InfFileName(0 to MAX_PATH - 1) as CHAR
	DrvDescription(0 to 255) as CHAR
	HardwareID(0 to ANYSIZE_ARRAY - 1) as CHAR
end type

type SP_DRVINFO_DETAIL_DATA_A as _SP_DRVINFO_DETAIL_DATA_A
type PSP_DRVINFO_DETAIL_DATA_A as _SP_DRVINFO_DETAIL_DATA_A ptr

type _SP_DRVINFO_DETAIL_DATA_W
	cbSize as DWORD
	InfDate as FILETIME
	CompatIDsOffset as DWORD
	CompatIDsLength as DWORD
	Reserved as ULONG_PTR
	SectionName(0 to 255) as WCHAR
	InfFileName(0 to MAX_PATH - 1) as WCHAR
	DrvDescription(0 to 255) as WCHAR
	HardwareID(0 to ANYSIZE_ARRAY - 1) as WCHAR
end type

type SP_DRVINFO_DETAIL_DATA_W as _SP_DRVINFO_DETAIL_DATA_W
type PSP_DRVINFO_DETAIL_DATA_W as _SP_DRVINFO_DETAIL_DATA_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(SP_DRVINFO_DETAIL_DATA) __MINGW_TYPEDEF_UAW(PSP_DRVINFO_DETAIL_DATA) typedef struct _SP_DRVINSTALL_PARAMS { DWORD cbSize; DWORD Rank; DWORD Flags; DWORD_PTR PrivateData; DWORD Reserved; } SP_DRVINSTALL_PARAMS,*PSP_DRVINSTALL_PARAMS;
const DNF_DUPDESC = &h00000001
const DNF_OLDDRIVER = &h00000002
const DNF_EXCLUDEFROMLIST = &h00000004
const DNF_NODRIVER = &h00000008
const DNF_LEGACYINF = &h00000010
const DNF_CLASS_DRIVER = &h00000020
const DNF_COMPATIBLE_DRIVER = &h00000040
const DNF_INET_DRIVER = &h00000080
const DNF_UNUSED1 = &h00000100
const DNF_INDEXED_DRIVER = &h00000200
const DNF_OLD_INET_DRIVER = &h00000400
const DNF_BAD_DRIVER = &h00000800
const DNF_DUPPROVIDER = &h00001000
const DNF_INF_IS_SIGNED = &h00002000
const DNF_OEM_F6_INF = &h00004000
const DNF_DUPDRIVERVER = &h00008000
const DNF_BASIC_DRIVER = &h00010000
const DNF_AUTHENTICODE_SIGNED = &h00020000
const DRIVER_HARDWAREID_RANK = &h00000FFF
const DRIVER_COMPATID_RANK = &h00003FFF
const DRIVER_UNTRUSTED_RANK = &h00008000
const DRIVER_UNTRUSTED_HARDWAREID_RANK = &h00008FFF
const DRIVER_UNTRUSTED_COMPATID_RANK = &h0000BFFF
const DRIVER_W9X_SUSPECT_RANK = &h0000C000
const DRIVER_W9X_SUSPECT_HARDWAREID_RANK = &h0000CFFF
const DRIVER_W9X_SUSPECT_COMPATID_RANK = &h0000FFFF
'' TODO: typedef DWORD (CALLBACK *PSP_DETSIG_CMPPROC)(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA NewDeviceData,PSP_DEVINFO_DATA ExistingDeviceData,PVOID CompareContext);

type _COINSTALLER_CONTEXT_DATA
	PostProcessing as WINBOOL
	InstallResult as DWORD
	PrivateData as PVOID
end type

type COINSTALLER_CONTEXT_DATA as _COINSTALLER_CONTEXT_DATA
type PCOINSTALLER_CONTEXT_DATA as _COINSTALLER_CONTEXT_DATA ptr

type _SP_CLASSIMAGELIST_DATA
	cbSize as DWORD
	ImageList as HIMAGELIST
	Reserved as ULONG_PTR
end type

type SP_CLASSIMAGELIST_DATA as _SP_CLASSIMAGELIST_DATA
type PSP_CLASSIMAGELIST_DATA as _SP_CLASSIMAGELIST_DATA ptr

type _SP_PROPSHEETPAGE_REQUEST
	cbSize as DWORD
	PageRequested as DWORD
	DeviceInfoSet as HDEVINFO
	DeviceInfoData as PSP_DEVINFO_DATA
end type

type SP_PROPSHEETPAGE_REQUEST as _SP_PROPSHEETPAGE_REQUEST
type PSP_PROPSHEETPAGE_REQUEST as _SP_PROPSHEETPAGE_REQUEST ptr
const SPPSR_SELECT_DEVICE_RESOURCES = 1
const SPPSR_ENUM_BASIC_DEVICE_PROPERTIES = 2
const SPPSR_ENUM_ADV_DEVICE_PROPERTIES = 3

type _SP_BACKUP_QUEUE_PARAMS_V2_A
	cbSize as DWORD
	FullInfPath(0 to MAX_PATH - 1) as CHAR
	FilenameOffset as INT
	ReinstallInstance(0 to MAX_PATH - 1) as CHAR
end type

type SP_BACKUP_QUEUE_PARAMS_V2_A as _SP_BACKUP_QUEUE_PARAMS_V2_A
type PSP_BACKUP_QUEUE_PARAMS_V2_A as _SP_BACKUP_QUEUE_PARAMS_V2_A ptr

type _SP_BACKUP_QUEUE_PARAMS_V2_W
	cbSize as DWORD
	FullInfPath(0 to MAX_PATH - 1) as WCHAR
	FilenameOffset as INT
	ReinstallInstance(0 to MAX_PATH - 1) as WCHAR
end type

type SP_BACKUP_QUEUE_PARAMS_V2_W as _SP_BACKUP_QUEUE_PARAMS_V2_W
type PSP_BACKUP_QUEUE_PARAMS_V2_W as _SP_BACKUP_QUEUE_PARAMS_V2_W ptr

type _SP_BACKUP_QUEUE_PARAMS_V1_A
	cbSize as DWORD
	FullInfPath(0 to MAX_PATH - 1) as CHAR
	FilenameOffset as INT
end type

type SP_BACKUP_QUEUE_PARAMS_V1_A as _SP_BACKUP_QUEUE_PARAMS_V1_A
type PSP_BACKUP_QUEUE_PARAMS_V1_A as _SP_BACKUP_QUEUE_PARAMS_V1_A ptr

type _SP_BACKUP_QUEUE_PARAMS_V1_W
	cbSize as DWORD
	FullInfPath(0 to MAX_PATH - 1) as WCHAR
	FilenameOffset as INT
end type

type SP_BACKUP_QUEUE_PARAMS_V1_W as _SP_BACKUP_QUEUE_PARAMS_V1_W
type PSP_BACKUP_QUEUE_PARAMS_V1_W as _SP_BACKUP_QUEUE_PARAMS_V1_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(SP_BACKUP_QUEUE_PARAMS_V1) __MINGW_TYPEDEF_UAW(PSP_BACKUP_QUEUE_PARAMS_V1) __MINGW_TYPEDEF_UAW(SP_BACKUP_QUEUE_PARAMS_V2) __MINGW_TYPEDEF_UAW(PSP_BACKUP_QUEUE_PARAMS_V2) typedef SP_BACKUP_QUEUE_PARAMS_V2_A SP_BACKUP_QUEUE_PARAMS_A;
type PSP_BACKUP_QUEUE_PARAMS_A as PSP_BACKUP_QUEUE_PARAMS_V2_A
type SP_BACKUP_QUEUE_PARAMS_W as SP_BACKUP_QUEUE_PARAMS_V2_W
type PSP_BACKUP_QUEUE_PARAMS_W as PSP_BACKUP_QUEUE_PARAMS_V2_W
type SP_BACKUP_QUEUE_PARAMS as SP_BACKUP_QUEUE_PARAMS_V2
type PSP_BACKUP_QUEUE_PARAMS as PSP_BACKUP_QUEUE_PARAMS_V2

#define _SPAPI_ERRORS
#define ERROR_EXPECTED_SECTION_NAME ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or 0)
#define ERROR_BAD_SECTION_NAME_LINE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or 1)
#define ERROR_SECTION_NAME_TOO_LONG ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or 2)
#define ERROR_GENERAL_SYNTAX ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or 3)
#define ERROR_WRONG_INF_STYLE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h100)
#define ERROR_SECTION_NOT_FOUND ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h101)
#define ERROR_LINE_NOT_FOUND ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h102)
#define ERROR_NO_BACKUP ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h103)
#define ERROR_NO_ASSOCIATED_CLASS ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h200)
#define ERROR_CLASS_MISMATCH ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h201)
#define ERROR_DUPLICATE_FOUND ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h202)
#define ERROR_NO_DRIVER_SELECTED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h203)
#define ERROR_KEY_DOES_NOT_EXIST ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h204)
#define ERROR_INVALID_DEVINST_NAME ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h205)
#define ERROR_INVALID_CLASS ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h206)
#define ERROR_DEVINST_ALREADY_EXISTS ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h207)
#define ERROR_DEVINFO_NOT_REGISTERED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h208)
#define ERROR_INVALID_REG_PROPERTY ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h209)
#define ERROR_NO_INF ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h20A)
#define ERROR_NO_SUCH_DEVINST ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h20B)
#define ERROR_CANT_LOAD_CLASS_ICON ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h20C)
#define ERROR_INVALID_CLASS_INSTALLER ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h20D)
#define ERROR_DI_DO_DEFAULT ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h20E)
#define ERROR_DI_NOFILECOPY ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h20F)
#define ERROR_INVALID_HWPROFILE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h210)
#define ERROR_NO_DEVICE_SELECTED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h211)
#define ERROR_DEVINFO_LIST_LOCKED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h212)
#define ERROR_DEVINFO_DATA_LOCKED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h213)
#define ERROR_DI_BAD_PATH ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h214)
#define ERROR_NO_CLASSINSTALL_PARAMS ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h215)
#define ERROR_FILEQUEUE_LOCKED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h216)
#define ERROR_BAD_SERVICE_INSTALLSECT ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h217)
#define ERROR_NO_CLASS_DRIVER_LIST ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h218)
#define ERROR_NO_ASSOCIATED_SERVICE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h219)
#define ERROR_NO_DEFAULT_DEVICE_INTERFACE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h21A)
#define ERROR_DEVICE_INTERFACE_ACTIVE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h21B)
#define ERROR_DEVICE_INTERFACE_REMOVED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h21C)
#define ERROR_BAD_INTERFACE_INSTALLSECT ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h21D)
#define ERROR_NO_SUCH_INTERFACE_CLASS ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h21E)
#define ERROR_INVALID_REFERENCE_STRING ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h21F)
#define ERROR_INVALID_MACHINENAME ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h220)
#define ERROR_REMOTE_COMM_FAILURE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h221)
#define ERROR_MACHINE_UNAVAILABLE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h222)
#define ERROR_NO_CONFIGMGR_SERVICES ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h223)
#define ERROR_INVALID_PROPPAGE_PROVIDER ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h224)
#define ERROR_NO_SUCH_DEVICE_INTERFACE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h225)
#define ERROR_DI_POSTPROCESSING_REQUIRED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h226)
#define ERROR_INVALID_COINSTALLER ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h227)
#define ERROR_NO_COMPAT_DRIVERS ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h228)
#define ERROR_NO_DEVICE_ICON ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h229)
#define ERROR_INVALID_INF_LOGCONFIG ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h22A)
#define ERROR_DI_DONT_INSTALL ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h22B)
#define ERROR_INVALID_FILTER_DRIVER ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h22C)
#define ERROR_NON_WINDOWS_NT_DRIVER ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h22D)
#define ERROR_NON_WINDOWS_DRIVER ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h22E)
#define ERROR_NO_CATALOG_FOR_OEM_INF ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h22F)
#define ERROR_DEVINSTALL_QUEUE_NONNATIVE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h230)
#define ERROR_NOT_DISABLEABLE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h231)
#define ERROR_CANT_REMOVE_DEVINST ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h232)
#define ERROR_INVALID_TARGET ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h233)
#define ERROR_DRIVER_NONNATIVE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h234)
#define ERROR_IN_WOW64 ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h235)
#define ERROR_SET_SYSTEM_RESTORE_POINT ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h236)
#define ERROR_INCORRECTLY_COPIED_INF ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h237)
#define ERROR_SCE_DISABLED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h238)
#define ERROR_UNKNOWN_EXCEPTION ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h239)
#define ERROR_PNP_REGISTRY_ERROR ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h23A)
#define ERROR_REMOTE_REQUEST_UNSUPPORTED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h23B)
#define ERROR_NOT_AN_INSTALLED_OEM_INF ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h23C)
#define ERROR_INF_IN_USE_BY_DEVICES ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h23D)
#define ERROR_DI_FUNCTION_OBSOLETE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h23E)
#define ERROR_NO_AUTHENTICODE_CATALOG ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h23F)
#define ERROR_AUTHENTICODE_DISALLOWED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h240)
#define ERROR_AUTHENTICODE_TRUSTED_PUBLISHER ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h241)
#define ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h242)
#define ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h243)
#define ERROR_SIGNATURE_OSATTRIBUTE_MISMATCH ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h244)
#define ERROR_ONLY_VALIDATE_VIA_AUTHENTICODE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h245)
#define ERROR_DEVICE_INSTALLER_NOT_READY ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h246)
#define ERROR_DRIVER_STORE_ADD_FAILED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h247)
#define ERROR_DEVICE_INSTALL_BLOCKED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h248)
#define ERROR_DRIVER_INSTALL_BLOCKED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h249)
#define ERROR_WRONG_INF_TYPE ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h24A)
#define ERROR_FILE_HASH_NOT_IN_CATALOG ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h24B)
#define ERROR_DRIVER_STORE_DELETE_FAILED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h24C)
#define ERROR_UNRECOVERABLE_STACK_OVERFLOW ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h300)
#define EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW ERROR_UNRECOVERABLE_STACK_OVERFLOW
#define ERROR_NO_DEFAULT_INTERFACE_DEVICE ERROR_NO_DEFAULT_DEVICE_INTERFACE
#define ERROR_INTERFACE_DEVICE_ACTIVE ERROR_DEVICE_INTERFACE_ACTIVE
#define ERROR_INTERFACE_DEVICE_REMOVED ERROR_DEVICE_INTERFACE_REMOVED
#define ERROR_NO_SUCH_INTERFACE_DEVICE ERROR_NO_SUCH_DEVICE_INTERFACE
#define ERROR_NOT_INSTALLED ((APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) or &h1000)
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetInfInformationA(LPCVOID InfSpec,DWORD SearchControl,PSP_INF_INFORMATION ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetInfInformationW(LPCVOID InfSpec,DWORD SearchControl,PSP_INF_INFORMATION ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
const INFINFO_INF_SPEC_IS_HINF = 1
const INFINFO_INF_NAME_IS_ABSOLUTE = 2
const INFINFO_DEFAULT_SEARCH = 3
const INFINFO_REVERSE_DEFAULT_SEARCH = 4
const INFINFO_INF_PATH_LIST_SEARCH = 5
#define SetupGetInfInformation __MINGW_NAME_AW(SetupGetInfInformation)
#define SetupQueryInfFileInformation __MINGW_NAME_AW(SetupQueryInfFileInformation)
#define SetupQueryInfOriginalFileInformation __MINGW_NAME_AW(SetupQueryInfOriginalFileInformation)
#define SetupQueryInfVersionInformation __MINGW_NAME_AW(SetupQueryInfVersionInformation)
#define SetupGetInfFileList __MINGW_NAME_AW(SetupGetInfFileList)
#define SetupOpenInfFile __MINGW_NAME_AW(SetupOpenInfFile)
#define SetupOpenAppendInfFile __MINGW_NAME_AW(SetupOpenAppendInfFile)
#define SetupFindFirstLine __MINGW_NAME_AW(SetupFindFirstLine)
#define SetupFindNextMatchLine __MINGW_NAME_AW(SetupFindNextMatchLine)
#define SetupGetLineByIndex __MINGW_NAME_AW(SetupGetLineByIndex)
#define SetupGetLineCount __MINGW_NAME_AW(SetupGetLineCount)
#define SetupGetLineText __MINGW_NAME_AW(SetupGetLineText)
#define SetupGetStringField __MINGW_NAME_AW(SetupGetStringField)
#define SetupGetMultiSzField __MINGW_NAME_AW(SetupGetMultiSzField)
#define SetupGetFileCompressionInfo __MINGW_NAME_AW(SetupGetFileCompressionInfo)
#define SetupGetFileCompressionInfoEx __MINGW_NAME_AW(SetupGetFileCompressionInfoEx)
#define SetupDecompressOrCopyFile __MINGW_NAME_AW(SetupDecompressOrCopyFile)
#define SetupGetSourceFileLocation __MINGW_NAME_AW(SetupGetSourceFileLocation)
#define SetupGetSourceFileSize __MINGW_NAME_AW(SetupGetSourceFileSize)
#define SetupGetTargetPath __MINGW_NAME_AW(SetupGetTargetPath)
#define SetupSetSourceList __MINGW_NAME_AW(SetupSetSourceList)
#define SetupAddToSourceList __MINGW_NAME_AW(SetupAddToSourceList)
#define SetupRemoveFromSourceList __MINGW_NAME_AW(SetupRemoveFromSourceList)
#define SetupQuerySourceList __MINGW_NAME_AW(SetupQuerySourceList)
#define SetupFreeSourceList __MINGW_NAME_AW(SetupFreeSourceList)
#define SetupPromptForDisk __MINGW_NAME_AW(SetupPromptForDisk)
#define SetupCopyError __MINGW_NAME_AW(SetupCopyError)
#define SetupRenameError __MINGW_NAME_AW(SetupRenameError)
#define SetupDeleteError __MINGW_NAME_AW(SetupDeleteError)
#define SetupBackupError __MINGW_NAME_AW(SetupBackupError)
const SRCLIST_TEMPORARY = &h00000001
const SRCLIST_NOBROWSE = &h00000002
const SRCLIST_SYSTEM = &h00000010
const SRCLIST_USER = &h00000020
const SRCLIST_SYSIFADMIN = &h00000040
const SRCLIST_SUBDIRS = &h00000100
const SRCLIST_APPEND = &h00000200
const SRCLIST_NOSTRIPPLATFORM = &h00000400
const FILE_COMPRESSION_NONE = 0
const FILE_COMPRESSION_WINLZA = 1
const FILE_COMPRESSION_MSZIP = 2
const FILE_COMPRESSION_NTCAB = 3

'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueryInfFileInformationA(PSP_INF_INFORMATION InfInformation,UINT InfIndex,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueryInfFileInformationW(PSP_INF_INFORMATION InfInformation,UINT InfIndex,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueryInfOriginalFileInformationA(PSP_INF_INFORMATION InfInformation,UINT InfIndex,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PSP_ORIGINAL_FILE_INFO_A OriginalFileInfo);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueryInfOriginalFileInformationW(PSP_INF_INFORMATION InfInformation,UINT InfIndex,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PSP_ORIGINAL_FILE_INFO_W OriginalFileInfo);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueryInfVersionInformationA(PSP_INF_INFORMATION InfInformation,UINT InfIndex,PCSTR Key,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueryInfVersionInformationW(PSP_INF_INFORMATION InfInformation,UINT InfIndex,PCWSTR Key,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetInfFileListA(PCSTR DirectoryPath,DWORD InfStyle,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetInfFileListW(PCWSTR DirectoryPath,DWORD InfStyle,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT HINF WINAPI SetupOpenInfFileW(PCWSTR FileName,PCWSTR InfClass,DWORD InfStyle,PUINT ErrorLine);
'' TODO: DECLSPEC_IMPORT HINF WINAPI SetupOpenInfFileA(PCSTR FileName,PCSTR InfClass,DWORD InfStyle,PUINT ErrorLine);
'' TODO: DECLSPEC_IMPORT HINF WINAPI SetupOpenMasterInf(VOID);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupOpenAppendInfFileW(PCWSTR FileName,HINF InfHandle,PUINT ErrorLine);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupOpenAppendInfFileA(PCSTR FileName,HINF InfHandle,PUINT ErrorLine);
'' TODO: DECLSPEC_IMPORT VOID WINAPI SetupCloseInfFile(HINF InfHandle);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupFindFirstLineA(HINF InfHandle,PCSTR Section,PCSTR Key,PINFCONTEXT Context);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupFindFirstLineW(HINF InfHandle,PCWSTR Section,PCWSTR Key,PINFCONTEXT Context);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupFindNextLine(PINFCONTEXT ContextIn,PINFCONTEXT ContextOut);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupFindNextMatchLineA(PINFCONTEXT ContextIn,PCSTR Key,PINFCONTEXT ContextOut);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupFindNextMatchLineW(PINFCONTEXT ContextIn,PCWSTR Key,PINFCONTEXT ContextOut);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetLineByIndexA(HINF InfHandle,PCSTR Section,DWORD Index,PINFCONTEXT Context);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetLineByIndexW(HINF InfHandle,PCWSTR Section,DWORD Index,PINFCONTEXT Context);
'' TODO: DECLSPEC_IMPORT LONG WINAPI SetupGetLineCountA(HINF InfHandle,PCSTR Section);
'' TODO: DECLSPEC_IMPORT LONG WINAPI SetupGetLineCountW(HINF InfHandle,PCWSTR Section);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetLineTextA(PINFCONTEXT Context,HINF InfHandle,PCSTR Section,PCSTR Key,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetLineTextW(PINFCONTEXT Context,HINF InfHandle,PCWSTR Section,PCWSTR Key,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT DWORD WINAPI SetupGetFieldCount(PINFCONTEXT Context);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetStringFieldA(PINFCONTEXT Context,DWORD FieldIndex,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetStringFieldW(PINFCONTEXT Context,DWORD FieldIndex,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetIntField(PINFCONTEXT Context,DWORD FieldIndex,PINT IntegerValue);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetMultiSzFieldA(PINFCONTEXT Context,DWORD FieldIndex,PSTR ReturnBuffer,DWORD ReturnBufferSize,LPDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetMultiSzFieldW(PINFCONTEXT Context,DWORD FieldIndex,PWSTR ReturnBuffer,DWORD ReturnBufferSize,LPDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetBinaryField(PINFCONTEXT Context,DWORD FieldIndex,PBYTE ReturnBuffer,DWORD ReturnBufferSize,LPDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT DWORD WINAPI SetupGetFileCompressionInfoA(PCSTR SourceFileName,PSTR *ActualSourceFileName,PDWORD SourceFileSize,PDWORD TargetFileSize,PUINT CompressionType);
'' TODO: DECLSPEC_IMPORT DWORD WINAPI SetupGetFileCompressionInfoW(PCWSTR SourceFileName,PWSTR *ActualSourceFileName,PDWORD SourceFileSize,PDWORD TargetFileSize,PUINT CompressionType);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetFileCompressionInfoExA(PCSTR SourceFileName,PSTR ActualSourceFileNameBuffer,DWORD ActualSourceFileNameBufferLen,PDWORD RequiredBufferLen,PDWORD SourceFileSize,PDWORD TargetFileSize,PUINT CompressionType);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetFileCompressionInfoExW(PCWSTR SourceFileName,PWSTR ActualSourceFileNameBuffer,DWORD ActualSourceFileNameBufferLen,PDWORD RequiredBufferLen,PDWORD SourceFileSize,PDWORD TargetFileSize,PUINT CompressionType);
'' TODO: DECLSPEC_IMPORT DWORD WINAPI SetupDecompressOrCopyFileA(PCSTR SourceFileName,PCSTR TargetFileName,PUINT CompressionType);
'' TODO: DECLSPEC_IMPORT DWORD WINAPI SetupDecompressOrCopyFileW(PCWSTR SourceFileName,PCWSTR TargetFileName,PUINT CompressionType);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetSourceFileLocationA(HINF InfHandle,PINFCONTEXT InfContext,PCSTR FileName,PUINT SourceId,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetSourceFileLocationW(HINF InfHandle,PINFCONTEXT InfContext,PCWSTR FileName,PUINT SourceId,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetSourceFileSizeA(HINF InfHandle,PINFCONTEXT InfContext,PCSTR FileName,PCSTR Section,PDWORD FileSize,UINT RoundingFactor);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetSourceFileSizeW(HINF InfHandle,PINFCONTEXT InfContext,PCWSTR FileName,PCWSTR Section,PDWORD FileSize,UINT RoundingFactor);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetTargetPathA(HINF InfHandle,PINFCONTEXT InfContext,PCSTR Section,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetTargetPathW(HINF InfHandle,PINFCONTEXT InfContext,PCWSTR Section,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupSetSourceListA(DWORD Flags,PCSTR *SourceList,UINT SourceCount);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupSetSourceListW(DWORD Flags,PCWSTR *SourceList,UINT SourceCount);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupCancelTemporarySourceList(VOID);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupAddToSourceListA(DWORD Flags,PCSTR Source);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupAddToSourceListW(DWORD Flags,PCWSTR Source);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupRemoveFromSourceListA(DWORD Flags,PCSTR Source);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupRemoveFromSourceListW(DWORD Flags,PCWSTR Source);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQuerySourceListA(DWORD Flags,PCSTR **List,PUINT Count);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQuerySourceListW(DWORD Flags,PCWSTR **List,PUINT Count);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupFreeSourceListA(PCSTR **List,UINT Count);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupFreeSourceListW(PCWSTR **List,UINT Count);
'' TODO: DECLSPEC_IMPORT UINT WINAPI SetupPromptForDiskA(HWND hwndParent,PCSTR DialogTitle,PCSTR DiskName,PCSTR PathToSource,PCSTR FileSought,PCSTR TagFile,DWORD DiskPromptStyle,PSTR PathBuffer,DWORD PathBufferSize,PDWORD PathRequiredSize);
'' TODO: DECLSPEC_IMPORT UINT WINAPI SetupPromptForDiskW(HWND hwndParent,PCWSTR DialogTitle,PCWSTR DiskName,PCWSTR PathToSource,PCWSTR FileSought,PCWSTR TagFile,DWORD DiskPromptStyle,PWSTR PathBuffer,DWORD PathBufferSize,PDWORD PathRequiredSize);
'' TODO: DECLSPEC_IMPORT UINT WINAPI SetupCopyErrorA(HWND hwndParent,PCSTR DialogTitle,PCSTR DiskName,PCSTR PathToSource,PCSTR SourceFile,PCSTR TargetPathFile,UINT Win32ErrorCode,DWORD Style,PSTR PathBuffer,DWORD PathBufferSize,PDWORD PathRequiredSize);
'' TODO: DECLSPEC_IMPORT UINT WINAPI SetupCopyErrorW(HWND hwndParent,PCWSTR DialogTitle,PCWSTR DiskName,PCWSTR PathToSource,PCWSTR SourceFile,PCWSTR TargetPathFile,UINT Win32ErrorCode,DWORD Style,PWSTR PathBuffer,DWORD PathBufferSize,PDWORD PathRequiredSize);
'' TODO: DECLSPEC_IMPORT UINT WINAPI SetupRenameErrorA(HWND hwndParent,PCSTR DialogTitle,PCSTR SourceFile,PCSTR TargetFile,UINT Win32ErrorCode,DWORD Style);
'' TODO: DECLSPEC_IMPORT UINT WINAPI SetupRenameErrorW(HWND hwndParent,PCWSTR DialogTitle,PCWSTR SourceFile,PCWSTR TargetFile,UINT Win32ErrorCode,DWORD Style);
'' TODO: DECLSPEC_IMPORT UINT WINAPI SetupDeleteErrorA(HWND hwndParent,PCSTR DialogTitle,PCSTR File,UINT Win32ErrorCode,DWORD Style);
'' TODO: DECLSPEC_IMPORT UINT WINAPI SetupDeleteErrorW(HWND hwndParent,PCWSTR DialogTitle,PCWSTR File,UINT Win32ErrorCode,DWORD Style);
'' TODO: DECLSPEC_IMPORT UINT WINAPI SetupBackupErrorA(HWND hwndParent,PCSTR DialogTitle,PCSTR SourceFile,PCSTR TargetFile,UINT Win32ErrorCode,DWORD Style);
'' TODO: DECLSPEC_IMPORT UINT WINAPI SetupBackupErrorW(HWND hwndParent,PCWSTR DialogTitle,PCWSTR SourceFile,PCWSTR TargetFile,UINT Win32ErrorCode,DWORD Style);

const IDF_NOBROWSE = &h00000001
const IDF_NOSKIP = &h00000002
const IDF_NODETAILS = &h00000004
const IDF_NOCOMPRESSED = &h00000008
const IDF_CHECKFIRST = &h00000100
const IDF_NOBEEP = &h00000200
const IDF_NOFOREGROUND = &h00000400
const IDF_WARNIFSKIP = &h00000800
const IDF_NOREMOVABLEMEDIAPROMPT = &h00001000
const IDF_USEDISKNAMEASPROMPT = &h00002000
const IDF_OEMDISK = &h80000000
const DPROMPT_SUCCESS = 0
const DPROMPT_CANCEL = 1
const DPROMPT_SKIPFILE = 2
const DPROMPT_BUFFERTOOSMALL = 3
const DPROMPT_OUTOFMEMORY = 4
const SETDIRID_NOT_FULL_PATH = &h00000001
const SRCINFO_PATH = 1
const SRCINFO_TAGFILE = 2
const SRCINFO_DESCRIPTION = 3
const SRCINFO_FLAGS = 4
const SRCINFO_TAGFILE2 = 5
const SRC_FLAGS_CABFILE = &h0010
#define SetupSetDirectoryId __MINGW_NAME_AW(SetupSetDirectoryId)
#define SetupSetDirectoryIdEx __MINGW_NAME_AW(SetupSetDirectoryIdEx)
#define SetupGetSourceInfo __MINGW_NAME_AW(SetupGetSourceInfo)
#define SetupInstallFile __MINGW_NAME_AW(SetupInstallFile)
#define SetupInstallFileEx __MINGW_NAME_AW(SetupInstallFileEx)

'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupSetDirectoryIdA(HINF InfHandle,DWORD Id,PCSTR Directory);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupSetDirectoryIdW(HINF InfHandle,DWORD Id,PCWSTR Directory);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupSetDirectoryIdExA(HINF InfHandle,DWORD Id,PCSTR Directory,DWORD Flags,DWORD Reserved1,PVOID Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupSetDirectoryIdExW(HINF InfHandle,DWORD Id,PCWSTR Directory,DWORD Flags,DWORD Reserved1,PVOID Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetSourceInfoA(HINF InfHandle,UINT SourceId,UINT InfoDesired,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetSourceInfoW(HINF InfHandle,UINT SourceId,UINT InfoDesired,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupInstallFileA(HINF InfHandle,PINFCONTEXT InfContext,PCSTR SourceFile,PCSTR SourcePathRoot,PCSTR DestinationName,DWORD CopyStyle,PSP_FILE_CALLBACK_A CopyMsgHandler,PVOID Context);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupInstallFileW(HINF InfHandle,PINFCONTEXT InfContext,PCWSTR SourceFile,PCWSTR SourcePathRoot,PCWSTR DestinationName,DWORD CopyStyle,PSP_FILE_CALLBACK_W CopyMsgHandler,PVOID Context);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupInstallFileExA(HINF InfHandle,PINFCONTEXT InfContext,PCSTR SourceFile,PCSTR SourcePathRoot,PCSTR DestinationName,DWORD CopyStyle,PSP_FILE_CALLBACK_A CopyMsgHandler,PVOID Context,PBOOL FileWasInUse);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupInstallFileExW(HINF InfHandle,PINFCONTEXT InfContext,PCWSTR SourceFile,PCWSTR SourcePathRoot,PCWSTR DestinationName,DWORD CopyStyle,PSP_FILE_CALLBACK_W CopyMsgHandler,PVOID Context,PBOOL FileWasInUse);

const SP_COPY_DELETESOURCE = &h0000001
const SP_COPY_REPLACEONLY = &h0000002
const SP_COPY_NEWER = &h0000004
const SP_COPY_NEWER_OR_SAME = SP_COPY_NEWER
const SP_COPY_NOOVERWRITE = &h0000008
const SP_COPY_NODECOMP = &h0000010
const SP_COPY_LANGUAGEAWARE = &h0000020
const SP_COPY_SOURCE_ABSOLUTE = &h0000040
const SP_COPY_SOURCEPATH_ABSOLUTE = &h0000080
const SP_COPY_IN_USE_NEEDS_REBOOT = &h0000100
const SP_COPY_FORCE_IN_USE = &h0000200
const SP_COPY_NOSKIP = &h0000400
const SP_FLAG_CABINETCONTINUATION = &h0000800
const SP_COPY_FORCE_NOOVERWRITE = &h0001000
const SP_COPY_FORCE_NEWER = &h0002000
const SP_COPY_WARNIFSKIP = &h0004000
const SP_COPY_NOBROWSE = &h0008000
const SP_COPY_NEWER_ONLY = &h0010000
const SP_COPY_SOURCE_SIS_MASTER = &h0020000
const SP_COPY_OEMINF_CATALOG_ONLY = &h0040000
const SP_COPY_REPLACE_BOOT_FILE = &h0080000
const SP_COPY_NOPRUNE = &h0100000
const SP_COPY_OEM_F6_INF = &h0200000
const SP_BACKUP_BACKUPPASS = &h00000001
const SP_BACKUP_DEMANDPASS = &h00000002
const SP_BACKUP_SPECIAL = &h00000004
const SP_BACKUP_BOOTFILE = &h00000008
#define SetupSetFileQueueAlternatePlatform __MINGW_NAME_AW(SetupSetFileQueueAlternatePlatform)
#define SetupQueueDeleteSection __MINGW_NAME_AW(SetupQueueDeleteSection)
#define SetupQueueRename __MINGW_NAME_AW(SetupQueueRename)
#define SetupQueueRenameSection __MINGW_NAME_AW(SetupQueueRenameSection)
#define SetupCommitFileQueue __MINGW_NAME_AW(SetupCommitFileQueue)
#define SetupScanFileQueue __MINGW_NAME_AW(SetupScanFileQueue)
#define SetupSetPlatformPathOverride __MINGW_NAME_AW(SetupSetPlatformPathOverride)
#define SetupQueueCopy __MINGW_NAME_AW(SetupQueueCopy)
#define SetupQueueCopyIndirect __MINGW_NAME_AW(SetupQueueCopyIndirect)
#define SetupQueueDefaultCopy __MINGW_NAME_AW(SetupQueueDefaultCopy)
#define SetupQueueCopySection __MINGW_NAME_AW(SetupQueueCopySection)
#define SetupQueueDelete __MINGW_NAME_AW(SetupQueueDelete)

'' TODO: DECLSPEC_IMPORT HSPFILEQ WINAPI SetupOpenFileQueue(VOID);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupCloseFileQueue(HSPFILEQ QueueHandle);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupSetFileQueueAlternatePlatformA(HSPFILEQ QueueHandle,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PCSTR AlternateDefaultCatalogFile);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupSetFileQueueAlternatePlatformW(HSPFILEQ QueueHandle,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PCWSTR AlternateDefaultCatalogFile);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupSetPlatformPathOverrideA(PCSTR Override);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupSetPlatformPathOverrideW(PCWSTR Override);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueCopyA(HSPFILEQ QueueHandle,PCSTR SourceRootPath,PCSTR SourcePath,PCSTR SourceFilename,PCSTR SourceDescription,PCSTR SourceTagfile,PCSTR TargetDirectory,PCSTR TargetFilename,DWORD CopyStyle);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueCopyW(HSPFILEQ QueueHandle,PCWSTR SourceRootPath,PCWSTR SourcePath,PCWSTR SourceFilename,PCWSTR SourceDescription,PCWSTR SourceTagfile,PCWSTR TargetDirectory,PCWSTR TargetFilename,DWORD CopyStyle);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueCopyIndirectA(PSP_FILE_COPY_PARAMS_A CopyParams);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueCopyIndirectW(PSP_FILE_COPY_PARAMS_W CopyParams);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueDefaultCopyA(HSPFILEQ QueueHandle,HINF InfHandle,PCSTR SourceRootPath,PCSTR SourceFilename,PCSTR TargetFilename,DWORD CopyStyle);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueDefaultCopyW(HSPFILEQ QueueHandle,HINF InfHandle,PCWSTR SourceRootPath,PCWSTR SourceFilename,PCWSTR TargetFilename,DWORD CopyStyle);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueCopySectionA(HSPFILEQ QueueHandle,PCSTR SourceRootPath,HINF InfHandle,HINF ListInfHandle,PCSTR Section,DWORD CopyStyle);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueCopySectionW(HSPFILEQ QueueHandle,PCWSTR SourceRootPath,HINF InfHandle,HINF ListInfHandle,PCWSTR Section,DWORD CopyStyle);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueDeleteA(HSPFILEQ QueueHandle,PCSTR PathPart1,PCSTR PathPart2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueDeleteW(HSPFILEQ QueueHandle,PCWSTR PathPart1,PCWSTR PathPart2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueDeleteSectionA(HSPFILEQ QueueHandle,HINF InfHandle,HINF ListInfHandle,PCSTR Section);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueDeleteSectionW(HSPFILEQ QueueHandle,HINF InfHandle,HINF ListInfHandle,PCWSTR Section);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueRenameA(HSPFILEQ QueueHandle,PCSTR SourcePath,PCSTR SourceFilename,PCSTR TargetPath,PCSTR TargetFilename);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueRenameW(HSPFILEQ QueueHandle,PCWSTR SourcePath,PCWSTR SourceFilename,PCWSTR TargetPath,PCWSTR TargetFilename);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueRenameSectionA(HSPFILEQ QueueHandle,HINF InfHandle,HINF ListInfHandle,PCSTR Section);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueueRenameSectionW(HSPFILEQ QueueHandle,HINF InfHandle,HINF ListInfHandle,PCWSTR Section);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupCommitFileQueueA(HWND Owner,HSPFILEQ QueueHandle,PSP_FILE_CALLBACK_A MsgHandler,PVOID Context);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupCommitFileQueueW(HWND Owner,HSPFILEQ QueueHandle,PSP_FILE_CALLBACK_W MsgHandler,PVOID Context);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupScanFileQueueA(HSPFILEQ FileQueue,DWORD Flags,HWND Window,PSP_FILE_CALLBACK_A CallbackRoutine,PVOID CallbackContext,PDWORD Result);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupScanFileQueueW(HSPFILEQ FileQueue,DWORD Flags,HWND Window,PSP_FILE_CALLBACK_W CallbackRoutine,PVOID CallbackContext,PDWORD Result);

const SPQ_SCAN_FILE_PRESENCE = &h00000001
const SPQ_SCAN_FILE_VALIDITY = &h00000002
const SPQ_SCAN_USE_CALLBACK = &h00000004
const SPQ_SCAN_USE_CALLBACKEX = &h00000008
const SPQ_SCAN_INFORM_USER = &h00000010
const SPQ_SCAN_PRUNE_COPY_QUEUE = &h00000020
const SPQ_SCAN_USE_CALLBACK_SIGNERINFO = &h00000040
const SPQ_SCAN_PRUNE_DELREN = &h00000080
const SPQ_DELAYED_COPY = &h00000001

'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetFileQueueCount(HSPFILEQ FileQueue,UINT SubQueueFileOp,PUINT NumOperations);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetFileQueueFlags(HSPFILEQ FileQueue,PDWORD Flags);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupSetFileQueueFlags(HSPFILEQ FileQueue,DWORD FlagMask,DWORD Flags);

const SPQ_FLAG_BACKUP_AWARE = &h00000001
const SPQ_FLAG_ABORT_IF_UNSIGNED = &h00000002
const SPQ_FLAG_FILES_MODIFIED = &h00000004
const SPQ_FLAG_VALID = &h00000007
const SPOST_NONE = 0
const SPOST_PATH = 1
const SPOST_URL = 2
const SPOST_MAX = 3
#define SetupCopyOEMInf __MINGW_NAME_AW(SetupCopyOEMInf)
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupCopyOEMInfA(PCSTR SourceInfFileName,PCSTR OEMSourceMediaLocation,DWORD OEMSourceMediaType,DWORD CopyStyle,PSTR DestinationInfFileName,DWORD DestinationInfFileNameSize,PDWORD RequiredSize,PSTR *DestinationInfFileNameComponent);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupCopyOEMInfW(PCWSTR SourceInfFileName,PCWSTR OEMSourceMediaLocation,DWORD OEMSourceMediaType,DWORD CopyStyle,PWSTR DestinationInfFileName,DWORD DestinationInfFileNameSize,PDWORD RequiredSize,PWSTR *DestinationInfFileNameComponent);
const SUOI_FORCEDELETE = &h00000001
#define SetupUninstallOEMInf __MINGW_NAME_AW(SetupUninstallOEMInf)
#define SetupCreateDiskSpaceList __MINGW_NAME_AW(SetupCreateDiskSpaceList)

'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupUninstallOEMInfA(PCSTR InfFileName,DWORD Flags,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupUninstallOEMInfW(PCWSTR InfFileName,DWORD Flags,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupUninstallNewlyCopiedInfs(HSPFILEQ FileQueue,DWORD Flags,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT HDSKSPC WINAPI SetupCreateDiskSpaceListA(PVOID Reserved1,DWORD Reserved2,UINT Flags);
'' TODO: DECLSPEC_IMPORT HDSKSPC WINAPI SetupCreateDiskSpaceListW(PVOID Reserved1,DWORD Reserved2,UINT Flags);

const SPDSL_IGNORE_DISK = &h00000001
const SPDSL_DISALLOW_NEGATIVE_ADJUST = &h00000002
#define SetupDuplicateDiskSpaceList __MINGW_NAME_AW(SetupDuplicateDiskSpaceList)
#define SetupQueryDrivesInDiskSpaceList __MINGW_NAME_AW(SetupQueryDrivesInDiskSpaceList)
#define SetupQuerySpaceRequiredOnDrive __MINGW_NAME_AW(SetupQuerySpaceRequiredOnDrive)
#define SetupAdjustDiskSpaceList __MINGW_NAME_AW(SetupAdjustDiskSpaceList)
#define SetupAddToDiskSpaceList __MINGW_NAME_AW(SetupAddToDiskSpaceList)
#define SetupAddSectionToDiskSpaceList __MINGW_NAME_AW(SetupAddSectionToDiskSpaceList)
#define SetupAddInstallSectionToDiskSpaceList __MINGW_NAME_AW(SetupAddInstallSectionToDiskSpaceList)
#define SetupRemoveFromDiskSpaceList __MINGW_NAME_AW(SetupRemoveFromDiskSpaceList)
#define SetupRemoveSectionFromDiskSpaceList __MINGW_NAME_AW(SetupRemoveSectionFromDiskSpaceList)
#define SetupRemoveInstallSectionFromDiskSpaceList __MINGW_NAME_AW(SetupRemoveInstallSectionFromDiskSpaceList)
#define SetupIterateCabinet __MINGW_NAME_AW(SetupIterateCabinet)

'' TODO: DECLSPEC_IMPORT HDSKSPC WINAPI SetupDuplicateDiskSpaceListA(HDSKSPC DiskSpace,PVOID Reserved1,DWORD Reserved2,UINT Flags);
'' TODO: DECLSPEC_IMPORT HDSKSPC WINAPI SetupDuplicateDiskSpaceListW(HDSKSPC DiskSpace,PVOID Reserved1,DWORD Reserved2,UINT Flags);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDestroyDiskSpaceList(HDSKSPC DiskSpace);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueryDrivesInDiskSpaceListA(HDSKSPC DiskSpace,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueryDrivesInDiskSpaceListW(HDSKSPC DiskSpace,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQuerySpaceRequiredOnDriveA(HDSKSPC DiskSpace,PCSTR DriveSpec,LONGLONG *SpaceRequired,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQuerySpaceRequiredOnDriveW(HDSKSPC DiskSpace,PCWSTR DriveSpec,LONGLONG *SpaceRequired,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupAdjustDiskSpaceListA(HDSKSPC DiskSpace,LPCSTR DriveRoot,LONGLONG Amount,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupAdjustDiskSpaceListW(HDSKSPC DiskSpace,LPCWSTR DriveRoot,LONGLONG Amount,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupAddToDiskSpaceListA(HDSKSPC DiskSpace,PCSTR TargetFilespec,LONGLONG FileSize,UINT Operation,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupAddToDiskSpaceListW(HDSKSPC DiskSpace,PCWSTR TargetFilespec,LONGLONG FileSize,UINT Operation,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupAddSectionToDiskSpaceListA(HDSKSPC DiskSpace,HINF InfHandle,HINF ListInfHandle,PCSTR SectionName,UINT Operation,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupAddSectionToDiskSpaceListW(HDSKSPC DiskSpace,HINF InfHandle,HINF ListInfHandle,PCWSTR SectionName,UINT Operation,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC DiskSpace,HINF InfHandle,HINF LayoutInfHandle,PCSTR SectionName,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupAddInstallSectionToDiskSpaceListW(HDSKSPC DiskSpace,HINF InfHandle,HINF LayoutInfHandle,PCWSTR SectionName,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupRemoveFromDiskSpaceListA(HDSKSPC DiskSpace,PCSTR TargetFilespec,UINT Operation,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupRemoveFromDiskSpaceListW(HDSKSPC DiskSpace,PCWSTR TargetFilespec,UINT Operation,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupRemoveSectionFromDiskSpaceListA(HDSKSPC DiskSpace,HINF InfHandle,HINF ListInfHandle,PCSTR SectionName,UINT Operation,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupRemoveSectionFromDiskSpaceListW(HDSKSPC DiskSpace,HINF InfHandle,HINF ListInfHandle,PCWSTR SectionName,UINT Operation,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupRemoveInstallSectionFromDiskSpaceListA(HDSKSPC DiskSpace,HINF InfHandle,HINF LayoutInfHandle,PCSTR SectionName,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupRemoveInstallSectionFromDiskSpaceListW(HDSKSPC DiskSpace,HINF InfHandle,HINF LayoutInfHandle,PCWSTR SectionName,PVOID Reserved1,UINT Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupIterateCabinetA(PCSTR CabinetFile,DWORD Reserved,PSP_FILE_CALLBACK_A MsgHandler,PVOID Context);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupIterateCabinetW(PCWSTR CabinetFile,DWORD Reserved,PSP_FILE_CALLBACK_W MsgHandler,PVOID Context);
'' TODO: DECLSPEC_IMPORT INT WINAPI SetupPromptReboot(HSPFILEQ FileQueue,HWND Owner,WINBOOL ScanOnly);

const SPFILEQ_FILE_IN_USE = &h00000001
const SPFILEQ_REBOOT_RECOMMENDED = &h00000002
const SPFILEQ_REBOOT_IN_PROGRESS = &h00000004
#define SetupDefaultQueueCallback __MINGW_NAME_AW(SetupDefaultQueueCallback)

'' TODO: DECLSPEC_IMPORT PVOID WINAPI SetupInitDefaultQueueCallback(HWND OwnerWindow);
'' TODO: DECLSPEC_IMPORT PVOID WINAPI SetupInitDefaultQueueCallbackEx(HWND OwnerWindow,HWND AlternateProgressWindow,UINT ProgressMessage,DWORD Reserved1,PVOID Reserved2);
'' TODO: DECLSPEC_IMPORT VOID WINAPI SetupTermDefaultQueueCallback(PVOID Context);
'' TODO: DECLSPEC_IMPORT UINT WINAPI SetupDefaultQueueCallbackA(PVOID Context,UINT Notification,UINT_PTR Param1,UINT_PTR Param2);
'' TODO: DECLSPEC_IMPORT UINT WINAPI SetupDefaultQueueCallbackW(PVOID Context,UINT Notification,UINT_PTR Param1,UINT_PTR Param2);

const FLG_ADDREG_DELREG_BIT = &h00008000
const FLG_ADDREG_BINVALUETYPE = &h00000001
const FLG_ADDREG_NOCLOBBER = &h00000002
const FLG_ADDREG_DELVAL = &h00000004
const FLG_ADDREG_APPEND = &h00000008
const FLG_ADDREG_KEYONLY = &h00000010
const FLG_ADDREG_OVERWRITEONLY = &h00000020
const FLG_ADDREG_64BITKEY = &h00001000
const FLG_ADDREG_KEYONLY_COMMON = &h00002000
const FLG_ADDREG_32BITKEY = &h00004000
const FLG_ADDREG_TYPE_MASK = &hFFFF0000 or FLG_ADDREG_BINVALUETYPE
const FLG_ADDREG_TYPE_SZ = &h00000000
const FLG_ADDREG_TYPE_MULTI_SZ = &h00010000
const FLG_ADDREG_TYPE_EXPAND_SZ = &h00020000
const FLG_ADDREG_TYPE_BINARY = &h00000000 or FLG_ADDREG_BINVALUETYPE
const FLG_ADDREG_TYPE_DWORD = &h00010000 or FLG_ADDREG_BINVALUETYPE
const FLG_ADDREG_TYPE_NONE = &h00020000 or FLG_ADDREG_BINVALUETYPE
const FLG_DELREG_VALUE = &h00000000
const FLG_DELREG_TYPE_MASK = FLG_ADDREG_TYPE_MASK
const FLG_DELREG_TYPE_SZ = FLG_ADDREG_TYPE_SZ
const FLG_DELREG_TYPE_MULTI_SZ = FLG_ADDREG_TYPE_MULTI_SZ
const FLG_DELREG_TYPE_EXPAND_SZ = FLG_ADDREG_TYPE_EXPAND_SZ
const FLG_DELREG_TYPE_BINARY = FLG_ADDREG_TYPE_BINARY
const FLG_DELREG_TYPE_DWORD = FLG_ADDREG_TYPE_DWORD
const FLG_DELREG_TYPE_NONE = FLG_ADDREG_TYPE_NONE
const FLG_DELREG_64BITKEY = FLG_ADDREG_64BITKEY
const FLG_DELREG_KEYONLY_COMMON = FLG_ADDREG_KEYONLY_COMMON
const FLG_DELREG_32BITKEY = FLG_ADDREG_32BITKEY
const FLG_DELREG_OPERATION_MASK = &h000000FE
const FLG_DELREG_MULTI_SZ_DELSTRING = (FLG_DELREG_TYPE_MULTI_SZ or FLG_ADDREG_DELREG_BIT) or &h00000002
const FLG_BITREG_CLEARBITS = &h00000000
const FLG_BITREG_SETBITS = &h00000001
const FLG_BITREG_64BITKEY = &h00001000
const FLG_BITREG_32BITKEY = &h00004000
const FLG_INI2REG_64BITKEY = &h00001000
const FLG_INI2REG_32BITKEY = &h00004000
const FLG_REGSVR_DLLREGISTER = &h00000001
const FLG_REGSVR_DLLINSTALL = &h00000002
const FLG_PROFITEM_CURRENTUSER = &h00000001
const FLG_PROFITEM_DELETE = &h00000002
const FLG_PROFITEM_GROUP = &h00000004
const FLG_PROFITEM_CSIDL = &h00000008
#define SetupInstallFromInfSection __MINGW_NAME_AW(SetupInstallFromInfSection)
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupInstallFromInfSectionA(HWND Owner,HINF InfHandle,PCSTR SectionName,UINT Flags,HKEY RelativeKeyRoot,PCSTR SourceRootPath,UINT CopyFlags,PSP_FILE_CALLBACK_A MsgHandler,PVOID Context,HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupInstallFromInfSectionW(HWND Owner,HINF InfHandle,PCWSTR SectionName,UINT Flags,HKEY RelativeKeyRoot,PCWSTR SourceRootPath,UINT CopyFlags,PSP_FILE_CALLBACK_W MsgHandler,PVOID Context,HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
const SPINST_LOGCONFIG = &h00000001
const SPINST_INIFILES = &h00000002
const SPINST_REGISTRY = &h00000004
const SPINST_INI2REG = &h00000008
const SPINST_FILES = &h00000010
const SPINST_BITREG = &h00000020
const SPINST_REGSVR = &h00000040
const SPINST_UNREGSVR = &h00000080
const SPINST_PROFILEITEMS = &h00000100
const SPINST_COPYINF = &h00000200
const SPINST_ALL = &h000003ff
const SPINST_SINGLESECTION = &h00010000
const SPINST_LOGCONFIG_IS_FORCED = &h00020000
const SPINST_LOGCONFIGS_ARE_OVERRIDES = &h00040000
const SPINST_REGISTERCALLBACKAWARE = &h00080000
#define SetupInstallFilesFromInfSection __MINGW_NAME_AW(SetupInstallFilesFromInfSection)
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupInstallFilesFromInfSectionA(HINF InfHandle,HINF LayoutInfHandle,HSPFILEQ FileQueue,PCSTR SectionName,PCSTR SourceRootPath,UINT CopyFlags);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupInstallFilesFromInfSectionW(HINF InfHandle,HINF LayoutInfHandle,HSPFILEQ FileQueue,PCWSTR SectionName,PCWSTR SourceRootPath,UINT CopyFlags);
const SPSVCINST_TAGTOFRONT = &h00000001
const SPSVCINST_ASSOCSERVICE = &h00000002
const SPSVCINST_DELETEEVENTLOGENTRY = &h00000004
const SPSVCINST_NOCLOBBER_DISPLAYNAME = &h00000008
const SPSVCINST_NOCLOBBER_STARTTYPE = &h00000010
const SPSVCINST_NOCLOBBER_ERRORCONTROL = &h00000020
const SPSVCINST_NOCLOBBER_LOADORDERGROUP = &h00000040
const SPSVCINST_NOCLOBBER_DEPENDENCIES = &h00000080
const SPSVCINST_NOCLOBBER_DESCRIPTION = &h00000100
const SPSVCINST_STOPSERVICE = &h00000200
const SPSVCINST_CLOBBER_SECURITY = &h00000400
const SPFILELOG_SYSTEMLOG = &h00000001
const SPFILELOG_FORCENEW = &h00000002
const SPFILELOG_QUERYONLY = &h00000004
const SPFILELOG_OEMFILE = &h00000001
type HSPFILELOG as PVOID
#define SetupInstallServicesFromInfSection __MINGW_NAME_AW(SetupInstallServicesFromInfSection)
#define SetupInstallServicesFromInfSectionEx __MINGW_NAME_AW(SetupInstallServicesFromInfSectionEx)
#define InstallHinfSection __MINGW_NAME_AW(InstallHinfSection)
#define SetupInitializeFileLog __MINGW_NAME_AW(SetupInitializeFileLog)
#define SetupLogFile __MINGW_NAME_AW(SetupLogFile)
#define SetupRemoveFileLogEntry __MINGW_NAME_AW(SetupRemoveFileLogEntry)

'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupInstallServicesFromInfSectionA(HINF InfHandle,PCSTR SectionName,DWORD Flags);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupInstallServicesFromInfSectionW(HINF InfHandle,PCWSTR SectionName,DWORD Flags);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupInstallServicesFromInfSectionExA(HINF InfHandle,PCSTR SectionName,DWORD Flags,HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PVOID Reserved1,PVOID Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupInstallServicesFromInfSectionExW(HINF InfHandle,PCWSTR SectionName,DWORD Flags,HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PVOID Reserved1,PVOID Reserved2);
'' TODO: VOID WINAPI InstallHinfSectionA(HWND Window,HINSTANCE ModuleHandle,PCSTR CommandLine,INT ShowCommand);
'' TODO: VOID WINAPI InstallHinfSectionW(HWND Window,HINSTANCE ModuleHandle,PCWSTR CommandLine,INT ShowCommand);
'' TODO: DECLSPEC_IMPORT HSPFILELOG WINAPI SetupInitializeFileLogA(PCSTR LogFileName,DWORD Flags);
'' TODO: DECLSPEC_IMPORT HSPFILELOG WINAPI SetupInitializeFileLogW(PCWSTR LogFileName,DWORD Flags);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupTerminateFileLog(HSPFILELOG FileLogHandle);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupLogFileA(HSPFILELOG FileLogHandle,PCSTR LogSectionName,PCSTR SourceFilename,PCSTR TargetFilename,DWORD Checksum,PCSTR DiskTagfile,PCSTR DiskDescription,PCSTR OtherInfo,DWORD Flags);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupLogFileW(HSPFILELOG FileLogHandle,PCWSTR LogSectionName,PCWSTR SourceFilename,PCWSTR TargetFilename,DWORD Checksum,PCWSTR DiskTagfile,PCWSTR DiskDescription,PCWSTR OtherInfo,DWORD Flags);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupRemoveFileLogEntryA(HSPFILELOG FileLogHandle,PCSTR LogSectionName,PCSTR TargetFilename);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupRemoveFileLogEntryW(HSPFILELOG FileLogHandle,PCWSTR LogSectionName,PCWSTR TargetFilename);

type SetupFileLogInfo as long
enum
	SetupFileLogSourceFilename
	SetupFileLogChecksum
	SetupFileLogDiskTagfile
	SetupFileLogDiskDescription
	SetupFileLogOtherInfo
	SetupFileLogMax
end enum

#define SetupQueryFileLog __MINGW_NAME_AW(SetupQueryFileLog)
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueryFileLogA(HSPFILELOG FileLogHandle,PCSTR LogSectionName,PCSTR TargetFilename,SetupFileLogInfo DesiredInfo,PSTR DataOut,DWORD ReturnBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupQueryFileLogW(HSPFILELOG FileLogHandle,PCWSTR LogSectionName,PCWSTR TargetFilename,SetupFileLogInfo DesiredInfo,PWSTR DataOut,DWORD ReturnBufferSize,PDWORD RequiredSize);
#define LogSeverity DWORD
const LogSevInformation = &h00000000
const LogSevWarning = &h00000001
const LogSevError = &h00000002
const LogSevFatalError = &h00000003
const LogSevMaximum = &h00000004
const DICD_GENERATE_ID = &h00000001
const DICD_INHERIT_CLASSDRVS = &h00000002
const DIOD_INHERIT_CLASSDRVS = &h00000002
const DIOD_CANCEL_REMOVE = &h00000004
const DIODI_NO_ADD = &h00000001
const SPRDI_FIND_DUPS = &h00000001
const SPDIT_NODRIVER = &h00000000
const SPDIT_CLASSDRIVER = &h00000001
const SPDIT_COMPATDRIVER = &h00000002
#define SetupLogError __MINGW_NAME_AW(SetupLogError)
#define SetupGetBackupInformation __MINGW_NAME_AW(SetupGetBackupInformation)
#define SetupPrepareQueueForRestore __MINGW_NAME_AW(SetupPrepareQueueForRestore)
#define SetupDiCreateDeviceInfoListEx __MINGW_NAME_AW(SetupDiCreateDeviceInfoListEx)
#define SetupDiGetDeviceInfoListDetail __MINGW_NAME_AW(SetupDiGetDeviceInfoListDetail)
#define SetupDiCreateDeviceInfo __MINGW_NAME_AW(SetupDiCreateDeviceInfo)
#define SetupDiOpenDeviceInfo __MINGW_NAME_AW(SetupDiOpenDeviceInfo)
#define SetupDiGetDeviceInstanceId __MINGW_NAME_AW(SetupDiGetDeviceInstanceId)
#define SetupDiCreateDeviceInterface __MINGW_NAME_AW(SetupDiCreateDeviceInterface)
#define SetupDiCreateInterfaceDevice __MINGW_NAME_AW(SetupDiCreateDeviceInterface)
#define SetupDiOpenDeviceInterface __MINGW_NAME_AW(SetupDiOpenDeviceInterface)

'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupOpenLog(WINBOOL Erase);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupLogErrorA(LPCSTR MessageString,DWORD Severity);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupLogErrorW(LPCWSTR MessageString,DWORD Severity);
'' TODO: DECLSPEC_IMPORT VOID WINAPI SetupCloseLog(VOID);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetBackupInformationA(HSPFILEQ QueueHandle,PSP_BACKUP_QUEUE_PARAMS_A BackupParams);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetBackupInformationW(HSPFILEQ QueueHandle,PSP_BACKUP_QUEUE_PARAMS_W BackupParams);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupPrepareQueueForRestoreA(HSPFILEQ QueueHandle,PCSTR BackupPath,DWORD RestoreFlags);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupPrepareQueueForRestoreW(HSPFILEQ QueueHandle,PCWSTR BackupPath,DWORD RestoreFlags);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupSetNonInteractiveMode(WINBOOL NonInteractiveFlag);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupGetNonInteractiveMode(VOID);
'' TODO: DECLSPEC_IMPORT HDEVINFO WINAPI SetupDiCreateDeviceInfoList(CONST GUID *ClassGuid,HWND hwndParent);
'' TODO: DECLSPEC_IMPORT HDEVINFO WINAPI SetupDiCreateDeviceInfoListExA(CONST GUID *ClassGuid,HWND hwndParent,PCSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT HDEVINFO WINAPI SetupDiCreateDeviceInfoListExW(CONST GUID *ClassGuid,HWND hwndParent,PCWSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDeviceInfoListClass(HDEVINFO DeviceInfoSet,LPGUID ClassGuid);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDeviceInfoListDetailA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_LIST_DETAIL_DATA_A DeviceInfoSetDetailData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDeviceInfoListDetailW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_LIST_DETAIL_DATA_W DeviceInfoSetDetailData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiCreateDeviceInfoA(HDEVINFO DeviceInfoSet,PCSTR DeviceName,CONST GUID *ClassGuid,PCSTR DeviceDescription,HWND hwndParent,DWORD CreationFlags,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiCreateDeviceInfoW(HDEVINFO DeviceInfoSet,PCWSTR DeviceName,CONST GUID *ClassGuid,PCWSTR DeviceDescription,HWND hwndParent,DWORD CreationFlags,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiOpenDeviceInfoA(HDEVINFO DeviceInfoSet,PCSTR DeviceInstanceId,HWND hwndParent,DWORD OpenFlags,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiOpenDeviceInfoW(HDEVINFO DeviceInfoSet,PCWSTR DeviceInstanceId,HWND hwndParent,DWORD OpenFlags,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDeviceInstanceIdA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSTR DeviceInstanceId,DWORD DeviceInstanceIdSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDeviceInstanceIdW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PWSTR DeviceInstanceId,DWORD DeviceInstanceIdSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiDeleteDeviceInfo(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiEnumDeviceInfo(HDEVINFO DeviceInfoSet,DWORD MemberIndex,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO DeviceInfoSet);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,CONST GUID *InterfaceClassGuid,DWORD MemberIndex,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
#define SetupDiEnumInterfaceDevice SetupDiEnumDeviceInterfaces
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiCreateDeviceInterfaceA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,CONST GUID *InterfaceClassGuid,PCSTR ReferenceString,DWORD CreationFlags,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiCreateDeviceInterfaceW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,CONST GUID *InterfaceClassGuid,PCWSTR ReferenceString,DWORD CreationFlags,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
#define SetupDiCreateInterfaceDeviceW SetupDiCreateDeviceInterfaceW
#define SetupDiCreateInterfaceDeviceA SetupDiCreateDeviceInterfaceA
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiOpenDeviceInterfaceA(HDEVINFO DeviceInfoSet,PCSTR DevicePath,DWORD OpenFlags,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiOpenDeviceInterfaceW(HDEVINFO DeviceInfoSet,PCWSTR DevicePath,DWORD OpenFlags,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData);

#define SetupDiOpenInterfaceDeviceW SetupDiOpenDeviceInterfaceW
#define SetupDiOpenInterfaceDeviceA SetupDiOpenDeviceInterfaceA
#define SetupDiOpenInterfaceDevice __MINGW_NAME_AW(SetupDiOpenDeviceInterface)
#define SetupDiGetDeviceInterfaceDetail __MINGW_NAME_AW(SetupDiGetDeviceInterfaceDetail)
#define SetupDiGetInterfaceDeviceDetail __MINGW_NAME_AW(SetupDiGetDeviceInterfaceDetail)
#define SetupDiEnumDriverInfo __MINGW_NAME_AW(SetupDiEnumDriverInfo)
#define SetupDiGetSelectedDriver __MINGW_NAME_AW(SetupDiGetSelectedDriver)
#define SetupDiSetSelectedDriver __MINGW_NAME_AW(SetupDiSetSelectedDriver)
#define SetupDiGetDriverInfoDetail __MINGW_NAME_AW(SetupDiGetDriverInfoDetail)
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDeviceInterfaceAlias(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,CONST GUID *AliasInterfaceClassGuid,PSP_DEVICE_INTERFACE_DATA AliasDeviceInterfaceData);
#define SetupDiGetInterfaceDeviceAlias SetupDiGetDeviceInterfaceAlias
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiDeleteDeviceInterfaceData(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
#define SetupDiDeleteInterfaceDeviceData SetupDiDeleteDeviceInterfaceData
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiRemoveDeviceInterface(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
#define SetupDiRemoveInterfaceDevice SetupDiRemoveDeviceInterface
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDeviceInterfaceDetailA(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,PSP_DEVICE_INTERFACE_DETAIL_DATA_A DeviceInterfaceDetailData,DWORD DeviceInterfaceDetailDataSize,PDWORD RequiredSize,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDeviceInterfaceDetailW(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,PSP_DEVICE_INTERFACE_DETAIL_DATA_W DeviceInterfaceDetailData,DWORD DeviceInterfaceDetailDataSize,PDWORD RequiredSize,PSP_DEVINFO_DATA DeviceInfoData);
#define SetupDiGetInterfaceDeviceDetailW SetupDiGetDeviceInterfaceDetailW
#define SetupDiGetInterfaceDeviceDetailA SetupDiGetDeviceInterfaceDetailA
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiInstallDeviceInterfaces(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
#define SetupDiInstallInterfaceDevices SetupDiInstallDeviceInterfaces

'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSetDeviceInterfaceDefault(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,DWORD Flags,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiRegisterDeviceInfo(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Flags,PSP_DETSIG_CMPPROC CompareProc,PVOID CompareContext,PSP_DEVINFO_DATA DupDeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiBuildDriverInfoList(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD DriverType);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiCancelDriverInfoSearch(HDEVINFO DeviceInfoSet);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiEnumDriverInfoA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD DriverType,DWORD MemberIndex,PSP_DRVINFO_DATA_A DriverInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiEnumDriverInfoW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD DriverType,DWORD MemberIndex,PSP_DRVINFO_DATA_W DriverInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetSelectedDriverA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_A DriverInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetSelectedDriverW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_W DriverInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSetSelectedDriverA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_A DriverInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSetSelectedDriverW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_W DriverInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDriverInfoDetailA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_A DriverInfoData,PSP_DRVINFO_DETAIL_DATA_A DriverInfoDetailData,DWORD DriverInfoDetailDataSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDriverInfoDetailW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_W DriverInfoData,PSP_DRVINFO_DETAIL_DATA_W DriverInfoDetailData,DWORD DriverInfoDetailDataSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiDestroyDriverInfoList(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD DriverType);

const DIGCF_DEFAULT = &h00000001
const DIGCF_PRESENT = &h00000002
const DIGCF_ALLCLASSES = &h00000004
const DIGCF_PROFILE = &h00000008
const DIGCF_DEVICEINTERFACE = &h00000010
const DIGCF_INTERFACEDEVICE = DIGCF_DEVICEINTERFACE
const DIBCI_NOINSTALLCLASS = &h00000001
const DIBCI_NODISPLAYCLASS = &h00000002
#define SetupDiGetClassDevs __MINGW_NAME_AW(SetupDiGetClassDevs)
#define SetupDiGetClassDevsEx __MINGW_NAME_AW(SetupDiGetClassDevsEx)
#define SetupDiGetINFClass __MINGW_NAME_AW(SetupDiGetINFClass)
#define SetupDiBuildClassInfoListEx __MINGW_NAME_AW(SetupDiBuildClassInfoListEx)
#define SetupDiGetClassDescription __MINGW_NAME_AW(SetupDiGetClassDescription)
#define SetupDiGetClassDescriptionEx __MINGW_NAME_AW(SetupDiGetClassDescriptionEx)
#define SetupDiInstallClass __MINGW_NAME_AW(SetupDiInstallClass)
#define SetupDiInstallClassEx __MINGW_NAME_AW(SetupDiInstallClassEx)
#define SetupDiOpenClassRegKeyEx __MINGW_NAME_AW(SetupDiOpenClassRegKeyEx)
#define SetupDiCreateDeviceInterfaceRegKey __MINGW_NAME_AW(SetupDiCreateDeviceInterfaceRegKey)
#define SetupDiCreateInterfaceDeviceRegKey __MINGW_NAME_AW(SetupDiCreateDeviceInterfaceRegKey)
#define SetupDiCreateDevRegKey __MINGW_NAME_AW(SetupDiCreateDevRegKey)
#define SetupDiGetHwProfileListEx __MINGW_NAME_AW(SetupDiGetHwProfileListEx)

'' TODO: DECLSPEC_IMPORT HDEVINFO WINAPI SetupDiGetClassDevsA(CONST GUID *ClassGuid,PCSTR Enumerator,HWND hwndParent,DWORD Flags);
'' TODO: DECLSPEC_IMPORT HDEVINFO WINAPI SetupDiGetClassDevsW(CONST GUID *ClassGuid,PCWSTR Enumerator,HWND hwndParent,DWORD Flags);
'' TODO: DECLSPEC_IMPORT HDEVINFO WINAPI SetupDiGetClassDevsExA(CONST GUID *ClassGuid,PCSTR Enumerator,HWND hwndParent,DWORD Flags,HDEVINFO DeviceInfoSet,PCSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT HDEVINFO WINAPI SetupDiGetClassDevsExW(CONST GUID *ClassGuid,PCWSTR Enumerator,HWND hwndParent,DWORD Flags,HDEVINFO DeviceInfoSet,PCWSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetINFClassA(PCSTR InfName,LPGUID ClassGuid,PSTR ClassName,DWORD ClassNameSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetINFClassW(PCWSTR InfName,LPGUID ClassGuid,PWSTR ClassName,DWORD ClassNameSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiBuildClassInfoList(DWORD Flags,LPGUID ClassGuidList,DWORD ClassGuidListSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiBuildClassInfoListExA(DWORD Flags,LPGUID ClassGuidList,DWORD ClassGuidListSize,PDWORD RequiredSize,PCSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiBuildClassInfoListExW(DWORD Flags,LPGUID ClassGuidList,DWORD ClassGuidListSize,PDWORD RequiredSize,PCWSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassDescriptionA(CONST GUID *ClassGuid,PSTR ClassDescription,DWORD ClassDescriptionSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassDescriptionW(CONST GUID *ClassGuid,PWSTR ClassDescription,DWORD ClassDescriptionSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassDescriptionExA(CONST GUID *ClassGuid,PSTR ClassDescription,DWORD ClassDescriptionSize,PDWORD RequiredSize,PCSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassDescriptionExW(CONST GUID *ClassGuid,PWSTR ClassDescription,DWORD ClassDescriptionSize,PDWORD RequiredSize,PCWSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION InstallFunction,HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSelectDevice(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSelectBestCompatDrv(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiInstallDevice(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiInstallDriverFiles(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiRegisterCoDeviceInstallers(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiRemoveDevice(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiUnremoveDevice(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiRestartDevices(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiChangeState(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiInstallClassA(HWND hwndParent,PCSTR InfFileName,DWORD Flags,HSPFILEQ FileQueue);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiInstallClassW(HWND hwndParent,PCWSTR InfFileName,DWORD Flags,HSPFILEQ FileQueue);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiInstallClassExA(HWND hwndParent,PCSTR InfFileName,DWORD Flags,HSPFILEQ FileQueue,CONST GUID *InterfaceClassGuid,PVOID Reserved1,PVOID Reserved2);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiInstallClassExW(HWND hwndParent,PCWSTR InfFileName,DWORD Flags,HSPFILEQ FileQueue,CONST GUID *InterfaceClassGuid,PVOID Reserved1,PVOID Reserved2);
'' TODO: DECLSPEC_IMPORT HKEY WINAPI SetupDiOpenClassRegKey(CONST GUID *ClassGuid,REGSAM samDesired);
const DIOCR_INSTALLER = &h00000001
const DIOCR_INTERFACE = &h00000002
'' TODO: DECLSPEC_IMPORT HKEY WINAPI SetupDiOpenClassRegKeyExA(CONST GUID *ClassGuid,REGSAM samDesired,DWORD Flags,PCSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT HKEY WINAPI SetupDiOpenClassRegKeyExW(CONST GUID *ClassGuid,REGSAM samDesired,DWORD Flags,PCWSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT HKEY WINAPI SetupDiCreateDeviceInterfaceRegKeyA(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,DWORD Reserved,REGSAM samDesired,HINF InfHandle,PCSTR InfSectionName);
'' TODO: DECLSPEC_IMPORT HKEY WINAPI SetupDiCreateDeviceInterfaceRegKeyW(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,DWORD Reserved,REGSAM samDesired,HINF InfHandle,PCWSTR InfSectionName);
#define SetupDiCreateInterfaceDeviceRegKeyW SetupDiCreateDeviceInterfaceRegKeyW
#define SetupDiCreateInterfaceDeviceRegKeyA SetupDiCreateDeviceInterfaceRegKeyA
'' TODO: DECLSPEC_IMPORT HKEY WINAPI SetupDiOpenDeviceInterfaceRegKey(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,DWORD Reserved,REGSAM samDesired);
#define SetupDiOpenInterfaceDeviceRegKey SetupDiOpenDeviceInterfaceRegKey
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiDeleteDeviceInterfaceRegKey(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,DWORD Reserved);

#define SetupDiDeleteInterfaceDeviceRegKey SetupDiDeleteDeviceInterfaceRegKey
const DIREG_DEV = &h00000001
const DIREG_DRV = &h00000002
const DIREG_BOTH = &h00000004

'' TODO: DECLSPEC_IMPORT HKEY WINAPI SetupDiCreateDevRegKeyA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Scope,DWORD HwProfile,DWORD KeyType,HINF InfHandle,PCSTR InfSectionName);
'' TODO: DECLSPEC_IMPORT HKEY WINAPI SetupDiCreateDevRegKeyW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Scope,DWORD HwProfile,DWORD KeyType,HINF InfHandle,PCWSTR InfSectionName);
'' TODO: DECLSPEC_IMPORT HKEY WINAPI SetupDiOpenDevRegKey(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Scope,DWORD HwProfile,DWORD KeyType,REGSAM samDesired);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiDeleteDevRegKey(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Scope,DWORD HwProfile,DWORD KeyType);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetHwProfileList(PDWORD HwProfileList,DWORD HwProfileListSize,PDWORD RequiredSize,PDWORD CurrentlyActiveIndex);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetHwProfileListExA(PDWORD HwProfileList,DWORD HwProfileListSize,PDWORD RequiredSize,PDWORD CurrentlyActiveIndex,PCSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetHwProfileListExW(PDWORD HwProfileList,DWORD HwProfileListSize,PDWORD RequiredSize,PDWORD CurrentlyActiveIndex,PCWSTR MachineName,PVOID Reserved);

const SPDRP_DEVICEDESC = &h00000000
const SPDRP_HARDWAREID = &h00000001
const SPDRP_COMPATIBLEIDS = &h00000002
const SPDRP_UNUSED0 = &h00000003
const SPDRP_SERVICE = &h00000004
const SPDRP_UNUSED1 = &h00000005
const SPDRP_UNUSED2 = &h00000006
const SPDRP_CLASS = &h00000007
const SPDRP_CLASSGUID = &h00000008
const SPDRP_DRIVER = &h00000009
const SPDRP_CONFIGFLAGS = &h0000000A
const SPDRP_MFG = &h0000000B
const SPDRP_FRIENDLYNAME = &h0000000C
const SPDRP_LOCATION_INFORMATION = &h0000000D
const SPDRP_PHYSICAL_DEVICE_OBJECT_NAME = &h0000000E
const SPDRP_CAPABILITIES = &h0000000F
const SPDRP_UI_NUMBER = &h00000010
const SPDRP_UPPERFILTERS = &h00000011
const SPDRP_LOWERFILTERS = &h00000012
const SPDRP_BUSTYPEGUID = &h00000013
const SPDRP_LEGACYBUSTYPE = &h00000014
const SPDRP_BUSNUMBER = &h00000015
const SPDRP_ENUMERATOR_NAME = &h00000016
const SPDRP_SECURITY = &h00000017
const SPDRP_SECURITY_SDS = &h00000018
const SPDRP_DEVTYPE = &h00000019
const SPDRP_EXCLUSIVE = &h0000001A
const SPDRP_CHARACTERISTICS = &h0000001B
const SPDRP_ADDRESS = &h0000001C
const SPDRP_UI_NUMBER_DESC_FORMAT = &h0000001D
const SPDRP_DEVICE_POWER_DATA = &h0000001E
const SPDRP_REMOVAL_POLICY = &h0000001F
const SPDRP_REMOVAL_POLICY_HW_DEFAULT = &h00000020
const SPDRP_REMOVAL_POLICY_OVERRIDE = &h00000021
const SPDRP_INSTALL_STATE = &h00000022
const SPDRP_LOCATION_PATHS = &h00000023
const SPDRP_MAXIMUM_PROPERTY = &h00000024
const SPCRP_SECURITY = &h00000017
const SPCRP_SECURITY_SDS = &h00000018
const SPCRP_DEVTYPE = &h00000019
const SPCRP_EXCLUSIVE = &h0000001A
const SPCRP_CHARACTERISTICS = &h0000001B
const SPCRP_MAXIMUM_PROPERTY = &h0000001C
#define SetupDiGetDeviceRegistryProperty __MINGW_NAME_AW(SetupDiGetDeviceRegistryProperty)
#define SetupDiGetClassRegistryProperty __MINGW_NAME_AW(SetupDiGetClassRegistryProperty)
#define SetupDiSetDeviceRegistryProperty __MINGW_NAME_AW(SetupDiSetDeviceRegistryProperty)
#define SetupDiSetClassRegistryProperty __MINGW_NAME_AW(SetupDiSetClassRegistryProperty)
#define SetupDiGetDeviceInstallParams __MINGW_NAME_AW(SetupDiGetDeviceInstallParams)
#define SetupDiGetClassInstallParams __MINGW_NAME_AW(SetupDiGetClassInstallParams)
#define SetupDiSetDeviceInstallParams __MINGW_NAME_AW(SetupDiSetDeviceInstallParams)
#define SetupDiSetClassInstallParams __MINGW_NAME_AW(SetupDiSetClassInstallParams)
#define SetupDiGetDriverInstallParams __MINGW_NAME_AW(SetupDiGetDriverInstallParams)
#define SetupDiSetDriverInstallParams __MINGW_NAME_AW(SetupDiSetDriverInstallParams)
#define SetupDiGetClassImageListEx __MINGW_NAME_AW(SetupDiGetClassImageListEx)
#define SetupDiGetClassDevPropertySheets __MINGW_NAME_AW(SetupDiGetClassDevPropertySheets)
#define SetupDiClassNameFromGuid __MINGW_NAME_AW(SetupDiClassNameFromGuid)
#define SetupDiClassNameFromGuidEx __MINGW_NAME_AW(SetupDiClassNameFromGuidEx)
#define SetupDiClassGuidsFromName __MINGW_NAME_AW(SetupDiClassGuidsFromName)
#define SetupDiClassGuidsFromNameEx __MINGW_NAME_AW(SetupDiClassGuidsFromNameEx)
#define SetupDiGetHwProfileFriendlyName __MINGW_NAME_AW(SetupDiGetHwProfileFriendlyName)
#define SetupDiGetHwProfileFriendlyNameEx __MINGW_NAME_AW(SetupDiGetHwProfileFriendlyNameEx)
#define SetupDiGetActualModelsSection __MINGW_NAME_AW(SetupDiGetActualModelsSection)
#define SetupDiGetActualSectionToInstall __MINGW_NAME_AW(SetupDiGetActualSectionToInstall)
#define SetupDiGetActualSectionToInstallEx __MINGW_NAME_AW(SetupDiGetActualSectionToInstallEx)
#define SetupEnumInfSections __MINGW_NAME_AW(SetupEnumInfSections)

'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDeviceRegistryPropertyA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Property,PDWORD PropertyRegDataType,PBYTE PropertyBuffer,DWORD PropertyBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDeviceRegistryPropertyW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Property,PDWORD PropertyRegDataType,PBYTE PropertyBuffer,DWORD PropertyBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassRegistryPropertyA(CONST GUID *ClassGuid,DWORD Property,PDWORD PropertyRegDataType,PBYTE PropertyBuffer,DWORD PropertyBufferSize,PDWORD RequiredSize,PCSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassRegistryPropertyW(CONST GUID *ClassGuid,DWORD Property,PDWORD PropertyRegDataType,PBYTE PropertyBuffer,DWORD PropertyBufferSize,PDWORD RequiredSize,PCWSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSetDeviceRegistryPropertyA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Property,CONST BYTE *PropertyBuffer,DWORD PropertyBufferSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSetDeviceRegistryPropertyW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Property,CONST BYTE *PropertyBuffer,DWORD PropertyBufferSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSetClassRegistryPropertyA(CONST GUID *ClassGuid,DWORD Property,CONST BYTE *PropertyBuffer,DWORD PropertyBufferSize,PCSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSetClassRegistryPropertyW(CONST GUID *ClassGuid,DWORD Property,CONST BYTE *PropertyBuffer,DWORD PropertyBufferSize,PCWSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDeviceInstallParamsA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DEVINSTALL_PARAMS_A DeviceInstallParams);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDeviceInstallParamsW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DEVINSTALL_PARAMS_W DeviceInstallParams);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassInstallParamsA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_CLASSINSTALL_HEADER ClassInstallParams,DWORD ClassInstallParamsSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassInstallParamsW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_CLASSINSTALL_HEADER ClassInstallParams,DWORD ClassInstallParamsSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSetDeviceInstallParamsA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DEVINSTALL_PARAMS_A DeviceInstallParams);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSetDeviceInstallParamsW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DEVINSTALL_PARAMS_W DeviceInstallParams);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSetClassInstallParamsA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_CLASSINSTALL_HEADER ClassInstallParams,DWORD ClassInstallParamsSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSetClassInstallParamsW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_CLASSINSTALL_HEADER ClassInstallParams,DWORD ClassInstallParamsSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDriverInstallParamsA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_A DriverInfoData,PSP_DRVINSTALL_PARAMS DriverInstallParams);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetDriverInstallParamsW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_W DriverInfoData,PSP_DRVINSTALL_PARAMS DriverInstallParams);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSetDriverInstallParamsA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_A DriverInfoData,PSP_DRVINSTALL_PARAMS DriverInstallParams);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSetDriverInstallParamsW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_W DriverInfoData,PSP_DRVINSTALL_PARAMS DriverInstallParams);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiLoadClassIcon(CONST GUID *ClassGuid,HICON *LargeIcon,PINT MiniIconIndex);

const DMI_MASK = &h00000001
const DMI_BKCOLOR = &h00000002
const DMI_USERECT = &h00000004

'' TODO: DECLSPEC_IMPORT INT WINAPI SetupDiDrawMiniIcon(HDC hdc,RECT rc,INT MiniIconIndex,DWORD Flags);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassBitmapIndex(CONST GUID *ClassGuid,PINT MiniIconIndex);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassImageList(PSP_CLASSIMAGELIST_DATA ClassImageListData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassImageListExA(PSP_CLASSIMAGELIST_DATA ClassImageListData,PCSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassImageListExW(PSP_CLASSIMAGELIST_DATA ClassImageListData,PCWSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassImageIndex(PSP_CLASSIMAGELIST_DATA ClassImageListData,CONST GUID *ClassGuid,PINT ImageIndex);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiDestroyClassImageList(PSP_CLASSIMAGELIST_DATA ClassImageListData);

const DIGCDP_FLAG_BASIC = &h00000001
const DIGCDP_FLAG_ADVANCED = &h00000002
const DIGCDP_FLAG_REMOTE_BASIC = &h00000003
const DIGCDP_FLAG_REMOTE_ADVANCED = &h00000004
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassDevPropertySheetsA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,LPPROPSHEETHEADERA PropertySheetHeader,DWORD PropertySheetHeaderPageListSize,PDWORD RequiredSize,DWORD PropertySheetType);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetClassDevPropertySheetsW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,LPPROPSHEETHEADERW PropertySheetHeader,DWORD PropertySheetHeaderPageListSize,PDWORD RequiredSize,DWORD PropertySheetType);
const IDI_RESOURCEFIRST = 159
const IDI_RESOURCE = 159
const IDI_RESOURCELAST = 161
const IDI_RESOURCEOVERLAYFIRST = 161
const IDI_RESOURCEOVERLAYLAST = 161
const IDI_CONFLICT = 161
const IDI_CLASSICON_OVERLAYFIRST = 500
const IDI_CLASSICON_OVERLAYLAST = 502
const IDI_PROBLEM_OVL = 500
const IDI_DISABLED_OVL = 501
const IDI_FORCED_OVL = 502

'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiAskForOEMDisk(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSelectOEMDrv(HWND hwndParent,HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiClassNameFromGuidA(CONST GUID *ClassGuid,PSTR ClassName,DWORD ClassNameSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiClassNameFromGuidW(CONST GUID *ClassGuid,PWSTR ClassName,DWORD ClassNameSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiClassNameFromGuidExA(CONST GUID *ClassGuid,PSTR ClassName,DWORD ClassNameSize,PDWORD RequiredSize,PCSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiClassNameFromGuidExW(CONST GUID *ClassGuid,PWSTR ClassName,DWORD ClassNameSize,PDWORD RequiredSize,PCWSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiClassGuidsFromNameA(PCSTR ClassName,LPGUID ClassGuidList,DWORD ClassGuidListSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiClassGuidsFromNameW(PCWSTR ClassName,LPGUID ClassGuidList,DWORD ClassGuidListSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiClassGuidsFromNameExA(PCSTR ClassName,LPGUID ClassGuidList,DWORD ClassGuidListSize,PDWORD RequiredSize,PCSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiClassGuidsFromNameExW(PCWSTR ClassName,LPGUID ClassGuidList,DWORD ClassGuidListSize,PDWORD RequiredSize,PCWSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetHwProfileFriendlyNameA(DWORD HwProfile,PSTR FriendlyName,DWORD FriendlyNameSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetHwProfileFriendlyNameW(DWORD HwProfile,PWSTR FriendlyName,DWORD FriendlyNameSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetHwProfileFriendlyNameExA(DWORD HwProfile,PSTR FriendlyName,DWORD FriendlyNameSize,PDWORD RequiredSize,PCSTR MachineName,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetHwProfileFriendlyNameExW(DWORD HwProfile,PWSTR FriendlyName,DWORD FriendlyNameSize,PDWORD RequiredSize,PCWSTR MachineName,PVOID Reserved);
const SPWPT_SELECTDEVICE = &h00000001
const SPWP_USE_DEVINFO_DATA = &h00000001
'' TODO: DECLSPEC_IMPORT HPROPSHEETPAGE WINAPI SetupDiGetWizardPage(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_INSTALLWIZARD_DATA InstallWizardData,DWORD PageType,DWORD Flags);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetSelectedDevice(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiSetSelectedDevice(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetActualModelsSectionA(PINFCONTEXT Context,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PSTR InfSectionWithExt,DWORD InfSectionWithExtSize,PDWORD RequiredSize,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetActualModelsSectionW(PINFCONTEXT Context,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PWSTR InfSectionWithExt,DWORD InfSectionWithExtSize,PDWORD RequiredSize,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetActualSectionToInstallA(HINF InfHandle,PCSTR InfSectionName,PSTR InfSectionWithExt,DWORD InfSectionWithExtSize,PDWORD RequiredSize,PSTR *Extension);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetActualSectionToInstallW(HINF InfHandle,PCWSTR InfSectionName,PWSTR InfSectionWithExt,DWORD InfSectionWithExtSize,PDWORD RequiredSize,PWSTR *Extension);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetActualSectionToInstallExA(HINF InfHandle,PCSTR InfSectionName,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PSTR InfSectionWithExt,DWORD InfSectionWithExtSize,PDWORD RequiredSize,PSTR *Extension,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetActualSectionToInstallExW(HINF InfHandle,PCWSTR InfSectionName,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PWSTR InfSectionWithExt,DWORD InfSectionWithExtSize,PDWORD RequiredSize,PWSTR *Extension,PVOID Reserved);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupEnumInfSectionsA (HINF InfHandle,UINT Index,PSTR Buffer,UINT Size,UINT *SizeNeeded);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupEnumInfSectionsW (HINF InfHandle,UINT Index,PWSTR Buffer,UINT Size,UINT *SizeNeeded);

type _SP_INF_SIGNER_INFO_A
	cbSize as DWORD
	CatalogFile(0 to MAX_PATH - 1) as CHAR
	DigitalSigner(0 to MAX_PATH - 1) as CHAR
	DigitalSignerVersion(0 to MAX_PATH - 1) as CHAR
end type

type SP_INF_SIGNER_INFO_A as _SP_INF_SIGNER_INFO_A
type PSP_INF_SIGNER_INFO_A as _SP_INF_SIGNER_INFO_A ptr

type _SP_INF_SIGNER_INFO_W
	cbSize as DWORD
	CatalogFile(0 to MAX_PATH - 1) as WCHAR
	DigitalSigner(0 to MAX_PATH - 1) as WCHAR
	DigitalSignerVersion(0 to MAX_PATH - 1) as WCHAR
end type

type SP_INF_SIGNER_INFO_W as _SP_INF_SIGNER_INFO_W
type PSP_INF_SIGNER_INFO_W as _SP_INF_SIGNER_INFO_W ptr
'' TODO: __MINGW_TYPEDEF_UAW(SP_INF_SIGNER_INFO) __MINGW_TYPEDEF_UAW(PSP_INF_SIGNER_INFO) DECLSPEC_IMPORT WINBOOL WINAPI SetupVerifyInfFileA(PCSTR InfName,PSP_ALTPLATFORM_INFO AltPlatformInfo,PSP_INF_SIGNER_INFO_A InfSignerInfo);
#define SetupVerifyInfFile __MINGW_NAME_AW(SetupVerifyInfFile)
#define SetupDiGetCustomDeviceProperty __MINGW_NAME_AW(SetupDiGetCustomDeviceProperty)
#define SetupConfigureWmiFromInfSection __MINGW_NAME_AW(SetupConfigureWmiFromInfSection)
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupVerifyInfFileW(PCWSTR InfName,PSP_ALTPLATFORM_INFO AltPlatformInfo,PSP_INF_SIGNER_INFO_W InfSignerInfo);
const DICUSTOMDEVPROP_MERGE_MULTISZ = &h00000001
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetCustomDevicePropertyA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PCSTR CustomPropertyName,DWORD Flags,PDWORD PropertyRegDataType,PBYTE PropertyBuffer,DWORD PropertyBufferSize,PDWORD RequiredSize);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupDiGetCustomDevicePropertyW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PCWSTR CustomPropertyName,DWORD Flags,PDWORD PropertyRegDataType,PBYTE PropertyBuffer,DWORD PropertyBufferSize,PDWORD RequiredSize);
const SCWMI_CLOBBER_SECURITY = &h00000001
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupConfigureWmiFromInfSectionA(HINF InfHandle,PCSTR SectionName,DWORD Flags);
'' TODO: DECLSPEC_IMPORT WINBOOL WINAPI SetupConfigureWmiFromInfSectionW(HINF InfHandle,PCWSTR SectionName,DWORD Flags);
